/* ========================================
   RIVISTA DIGITALE - 5G MAGAZINE STYLES
   Modern Editorial Design System
   ======================================== */

/* IMPORT FONTS */
@import url('https://fonts.googleapis.com/css2?family=Lato:wght@300;400;700&family=Poppins:wght@400;600;700;800&display=swap');

/* CSS VARIABLES */
:root {
  /* Colors */
  --primary-violet: #7C3AED;
  --primary-blue: #3B82F6;
  --gradient-start: #7C3AED;
  --gradient-end: #3B82F6;
  --text-dark: #1F2937;
  --text-medium: #6B7280;
  --text-light: #9CA3AF;
  --bg-white: #FFFFFF;
  --bg-light: #F9FAFB;
  --border-light: #E5E7EB;
  
  /* Typography */
  --font-heading: 'Poppins', sans-serif;
  --font-body: 'Lato', sans-serif;
  
  /* Spacing */
  --spacing-xs: 0.5rem;
  --spacing-sm: 1rem;
  --spacing-md: 1.5rem;
  --spacing-lg: 2rem;
  --spacing-xl: 3rem;
  --spacing-2xl: 4rem;
  
  /* Shadows */
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
  
  /* Border Radius */
  --radius-sm: 0.375rem;
  --radius-md: 0.5rem;
  --radius-lg: 0.75rem;
  --radius-xl: 1rem;
}

/* RESET & BASE STYLES */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.7;
  color: var(--text-dark);
  background-color: var(--bg-white);
  -webkit-font-smoothing: antialiased;
}

/* TYPOGRAPHY */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: 1.3;
  color: var(--text-dark);
  margin-bottom: var(--spacing-sm);
}

h1 {
  font-size: 2.5rem;
  font-weight: 800;
}

h2 {
  font-size: 2rem;
  font-weight: 700;
}

h3 {
  font-size: 1.5rem;
  font-weight: 600;
}

h4 {
  font-size: 1.25rem;
  font-weight: 600;
}

p {
  margin-bottom: var(--spacing-sm);
  color: var(--text-dark);
}

a {
  color: var(--primary-violet);
  text-decoration: none;
  transition: color 0.3s ease;
}

a:hover {
  color: var(--primary-blue);
}

/* GRADIENT TEXT */
.gradient-text {
  background: linear-gradient(135deg, var(--gradient-start), var(--gradient-end));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* GRADIENT BACKGROUND */
.gradient-bg {
  background: linear-gradient(135deg, var(--gradient-start), var(--gradient-end));
}

/* BUTTONS */
.btn {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 1rem;
  border-radius: var(--radius-md);
  transition: all 0.3s ease;
  cursor: pointer;
  border: none;
}

.btn-primary {
  background: linear-gradient(135deg, var(--gradient-start), var(--gradient-end));
  color: white;
  box-shadow: var(--shadow-md);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.btn-secondary {
  background-color: white;
  color: var(--primary-violet);
  border: 2px solid var(--primary-violet);
}

.btn-secondary:hover {
  background-color: var(--primary-violet);
  color: white;
}

/* CARDS */
.card {
  background: white;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: all 0.3s ease;
}

.card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-4px);
}

.card-image {
  width: 100%;
  height: 250px;
  object-fit: cover;
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}

.card-content {
  padding: var(--spacing-md);
}

.card-category {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  background: linear-gradient(135deg, var(--gradient-start), var(--gradient-end));
  color: white;
  font-family: var(--font-heading);
  font-size: 0.75rem;
  font-weight: 600;
  border-radius: var(--radius-sm);
  margin-bottom: var(--spacing-sm);
  text-transform: uppercase;
}

.card-title {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: var(--spacing-sm);
}

.card-excerpt {
  font-size: 0.9rem;
  color: var(--text-medium);
  margin-bottom: var(--spacing-sm);
}

.card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.8rem;
  color: var(--text-light);
}

.reading-time {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.reading-time::before {
  content: '📖';
}

/* CONTAINER */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--spacing-md);
}

/* HEADER */
header {
  background-color: white;
  box-shadow: var(--shadow-sm);
  position: sticky;
  top: 0;
  z-index: 1000;
}

.header-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--spacing-md) 0;
}

.logo {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--text-dark);
}

logo a {
  color: var(--text-dark);
}

nav ul {
  display: flex;
  list-style: none;
  gap: var(--spacing-lg);
}

nav a {
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--text-dark);
  transition: color 0.3s ease;
}

nav a:hover {
  color: var(--primary-violet);
}

/* HERO SECTION */
.hero {
  padding: var(--spacing-2xl) 0;
  background: linear-gradient(135deg, #F5F7FA 0%, #E8F0FE 100%);
}

.hero-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--spacing-xl);
  align-items: center;
}

.hero-text h1 {
  font-size: 3rem;
  margin-bottom: var(--spacing-md);
  line-height: 1.2;
}

.hero-text p {
  font-size: 1.1rem;
  color: var(--text-medium);
  margin-bottom: var(--spacing-lg);
}

.hero-image {
  width: 100%;
  height: 400px;
  object-fit: cover;
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
}

/* SECTIONS */
section {
  padding: var(--spacing-2xl) 0;
}

.section-header {
  text-align: center;
  margin-bottom: var(--spacing-xl);
}

.section-title {
  font-size: 2rem;
  margin-bottom: var(--spacing-sm);
}

.section-subtitle {
  font-size: 1.1rem;
  color: var(--text-medium);
}

/* ARTICLE GRID */
.article-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: var(--spacing-lg);
}

/* FEATURED ARTICLE */
.featured-article {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--spacing-xl);
  align-items: center;
  margin-bottom: var(--spacing-xl);
}

.featured-image {
  width: 100%;
  height: 400px;
  object-fit: cover;
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
}

.featured-content h2 {
  font-size: 2.5rem;
  margin-bottom: var(--spacing-md);
}

.featured-content p {
  font-size: 1.1rem;
  color: var(--text-medium);
  margin-bottom: var(--spacing-md);
}

/* EDITORIAL NOTE */
.editorial-note {
  background: linear-gradient(135deg, #F5F7FA 0%, #E8F0FE 100%);
  padding: var(--spacing-xl);
  border-radius: var(--radius-xl);
  margin-bottom: var(--spacing-xl);
}

.editorial-note h3 {
  margin-bottom: var(--spacing-md);
}

/* FOOTER */
footer {
  background-color: var(--text-dark);
  color: white;
  padding: var(--spacing-xl) 0 var(--spacing-md);
}

.footer-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: var(--spacing-xl);
  margin-bottom: var(--spacing-xl);
}

.footer-section h4 {
  color: white;
  margin-bottom: var(--spacing-md);
}

.footer-section p,
.footer-section a {
  color: var(--text-light);
  font-size: 0.9rem;
  margin-bottom: var(--spacing-sm);
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: var(--spacing-md);
  text-align: center;
  font-size: 0.8rem;
  color: var(--text-light);
}

/* COOKIE BANNER */
.cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background-color: var(--text-dark);
  color: white;
  padding: var(--spacing-md);
  z-index: 9999;
  display: none;
}

.cookie-banner.active {
  display: block;
}

.cookie-banner-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--spacing-lg);
}

.cookie-banner-text {
  font-size: 0.9rem;
}

/* RESPONSIVE DESIGN */
@media (max-width: 768px) {
  h1 {
    font-size: 2rem;
  }
  
  h2 {
    font-size: 1.5rem;
  }
  
  .hero-content {
    grid-template-columns: 1fr;
  }
  
  .hero-text h1 {
    font-size: 2rem;
  }
  
  .featured-article {
    grid-template-columns: 1fr;
  }
  
  .article-grid {
    grid-template-columns: 1fr;
  }
  
  nav ul {
    flex-direction: column;
    gap: var(--spacing-sm);
  }
  
  .header-content {
    flex-direction: column;
    gap: var(--spacing-md);
  }
}

/* UTILITY CLASSES */
.text-center {
  text-align: center;
}

.mt-xl {
  margin-top: var(--spacing-xl);
}

.mb-xl {
  margin-bottom: var(--spacing-xl);
}

.bg-light {
  background-color: var(--bg-light);
}

/* INLINE IMAGES */
.article-image {
  width: 100%;
  height: 350px;
  object-fit: cover;
  border-radius: var(--radius-lg);
  margin: var(--spacing-xl) 0;
  box-shadow: var(--shadow-md);
}

.article-image-caption {
  font-size: 0.85rem;
  color: var(--text-light);
  text-align: center;
  margin-top: var(--spacing-xs);
  font-style: italic;
}

/* AUTHOR INFO */
.author-info {
  display: flex;
  align-items: center;
  gap: var(--spacing-md);
  margin-bottom: var(--spacing-lg);
  padding-bottom: var(--spacing-md);
  border-bottom: 1px solid var(--border-light);
}

.author-avatar {
  width: 50px;
  height: 50px;
  background: linear-gradient(135deg, var(--gradient-start), var(--gradient-end));
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 700;
}

.author-details h4 {
  margin-bottom: 0.25rem;
  font-size: 1rem;
}

.author-details p {
  margin: 0;
  font-size: 0.85rem;
  color: var(--text-medium);
}

/* PUBLICATION DATE */
.publication-date {
  display: inline-block;
  font-size: 0.85rem;
  color: var(--text-light);
  margin-bottom: var(--spacing-md);
}

/* LAST UPDATED */
.last-updated {
  font-size: 0.8rem;
  color: var(--text-light);
  margin-top: var(--spacing-xl);
  padding-top: var(--spacing-md);
  border-top: 1px solid var(--border-light);
}

/* MAP ILLUSTRATION */
.map-illustration {
  width: 100%;
  height: 400px;
  background: linear-gradient(135deg, #E8F0FE 0%, #F5F7FA 100%);
  border-radius: var(--radius-xl);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: var(--spacing-xl) 0;
  position: relative;
}

.map-illustration::before {
  content: '📍';
  font-size: 4rem;
}

/* CONTACT FORM */
.contact-form {
  max-width: 600px;
  margin: 0 auto;
}

.form-group {
  margin-bottom: var(--spacing-md);
}

.form-group label {
  display: block;
  font-weight: 600;
  margin-bottom: var(--spacing-xs);
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  font-family: var(--font-body);
  font-size: 1rem;
}

.form-group textarea {
  height: 150px;
  resize: vertical;
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--primary-violet);
  box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.1);
}

/* NAVIGATION BREADCRUMBS */
.breadcrumbs {
  font-size: 0.85rem;
  color: var(--text-light);
  margin-bottom: var(--spacing-md);
}

.breadcrumbs a {
  color: var(--primary-violet);
}

.breadcrumbs span {
  margin: 0 0.5rem;
}