/* Castello Sforzesco Website - Main Styles */

:root {
  --primary-color: #8B4513;
  --secondary-color: #D4AF37;
  --text-dark: #2C1810;
  --text-light: #666;
  --background-light: #F8F6F3;
  --white: #FFFFFF;
  --border-color: #E5E1DB;
  --success-color: #4CAF50;
  --shadow-sm: 0 2px 4px rgba(0,0,0,0.1);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.15);
  --shadow-lg: 0 8px 24px rgba(0,0,0,0.2);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  line-height: 1.7;
  color: var(--text-dark);
  background-color: var(--white);
  font-size: 16px;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

.container-wide {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  line-height: 1.3;
  color: var(--text-dark);
  margin-bottom: 1rem;
}

h1 {
  font-size: 2.5rem;
  margin-bottom: 1.5rem;
}

h2 {
  font-size: 2rem;
  margin-top: 2.5rem;
  margin-bottom: 1.2rem;
}

h3 {
  font-size: 1.5rem;
  margin-top: 2rem;
  margin-bottom: 1rem;
}

p {
  margin-bottom: 1.2rem;
  color: var(--text-light);
  max-width: 75ch;
}

/* Header Styles */
.header {
  background-color: var(--white);
  box-shadow: var(--shadow-sm);
  position: sticky;
  top: 0;
  z-index: 1000;
  border-bottom: 3px solid var(--primary-color);
}

.header-main {
  padding: 15px 0;
}

.header-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.header-content .lang-switcher {
  flex-shrink: 0;
}

.logo {
  display: flex;
  align-items: center;
  text-decoration: none;
  gap: 12px;
}

.logo-img {
  height: 60px;
  width: auto;
}

.logo-text {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--primary-color);
}

/* Navigation */
.nav {
  display: flex;
  align-items: center;
  gap: 30px;
}

.nav-menu {
  display: flex;
  list-style: none;
  gap: 25px;
}

.nav-link {
  color: var(--text-dark);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.3s;
  position: relative;
}

.nav-link:hover,
.nav-link.active {
  color: var(--primary-color);
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -5px;
  left: 0;
  width: 0;
  height: 2px;
  background-color: var(--primary-color);
  transition: width 0.3s;
}

.nav-link:hover::after,
.nav-link.active::after {
  width: 100%;
}

/* Language Switcher */
.lang-switcher {
  position: relative;
}

.lang-current {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 8px 15px;
  border: 1px solid var(--border-color);
  border-radius: 5px;
  background: var(--white);
  cursor: pointer;
  font-weight: 500;
  transition: all 0.3s;
}

.lang-current:hover {
  border-color: var(--primary-color);
  background: var(--background-light);
}

.lang-dropdown {
  position: absolute;
  top: 100%;
  right: 0;
  margin-top: -2px;
  padding-top: 6px;
  background: var(--white);
  border: 1px solid var(--border-color);
  border-radius: 5px;
  box-shadow: var(--shadow-md);
  min-width: 200px;
  display: none;
  max-height: 400px;
  overflow-y: auto;
  z-index: 1002;
}

.lang-switcher:hover .lang-dropdown {
  display: block;
}

/* Keep menu open while moving from trigger to list (no dead hover gap) */
.lang-switcher:hover .lang-current {
  border-bottom-left-radius: 0;
  border-bottom-right-radius: 0;
  border-bottom-color: transparent;
}

.lang-option {
  display: block;
  padding: 10px 15px;
  color: var(--text-dark);
  text-decoration: none;
  transition: background 0.3s;
}

.lang-option:hover {
  background: var(--background-light);
  color: var(--primary-color);
}

/* CTA Button */
.cta-btn {
  display: inline-block;
  padding: 12px 28px;
  background: linear-gradient(135deg, var(--primary-color), #A0522D);
  color: var(--white);
  text-decoration: none;
  border-radius: 25px;
  font-weight: 600;
  transition: all 0.3s;
  box-shadow: var(--shadow-sm);
  border: none;
  cursor: pointer;
  font-size: 1rem;
}

.cta-btn:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  background: linear-gradient(135deg, #A0522D, var(--primary-color));
}

.cta-btn-secondary {
  background: linear-gradient(135deg, var(--secondary-color), #DAA520);
}

.cta-btn-secondary:hover {
  background: linear-gradient(135deg, #DAA520, var(--secondary-color));
}

/* Hero Section */
.hero {
  position: relative;
  min-height: 600px;
  display: flex;
  align-items: center;
  background: linear-gradient(135deg, rgba(139, 69, 19, 0.9), rgba(160, 82, 45, 0.8)),
              url('../images/20110725_Castello_Sforzesco_Milan_5557.jpg') center/cover;
  color: var(--white);
  padding: 80px 0;
}

.hero-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 50px;
  align-items: center;
}

.hero-text h1 {
  color: var(--white);
  font-size: 3rem;
  margin-bottom: 1.5rem;
  text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.hero-text p {
  color: rgba(255,255,255,0.95);
  font-size: 1.2rem;
  margin-bottom: 2rem;
  max-width: 100%;
}

.hero-cta {
  display: flex;
  gap: 15px;
  flex-wrap: wrap;
}

.hero-widget {
  background: var(--white);
  border-radius: 12px;
  padding: 30px;
  box-shadow: var(--shadow-lg);
}

.disclaimer-small {
  font-size: 0.75rem;
  color: rgba(255,255,255,0.7);
  margin-top: 15px;
  font-style: italic;
}

/* Content Sections */
.section {
  padding: 60px 0;
}

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

.section-header {
  text-align: center;
  max-width: 800px;
  margin: 0 auto 50px;
}

/* Quick Summary Table */
.quick-summary {
  background: var(--white);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: var(--shadow-md);
  margin: 30px 0;
}

.summary-table {
  width: 100%;
  border-collapse: collapse;
}

.summary-table th {
  background: var(--primary-color);
  color: var(--white);
  padding: 15px;
  text-align: left;
  font-weight: 600;
}

.summary-table td {
  padding: 15px;
  border-bottom: 1px solid var(--border-color);
}

.summary-table tr:last-child td {
  border-bottom: none;
}

.summary-table tr:nth-child(even) {
  background: var(--background-light);
}

/* Info Cards */
.info-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 25px;
  margin: 40px 0;
}

.info-card {
  background: var(--white);
  border-radius: 12px;
  padding: 30px;
  box-shadow: var(--shadow-sm);
  transition: all 0.3s;
  border-top: 4px solid var(--primary-color);
}

.info-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-md);
}

.info-card-icon {
  font-size: 2.5rem;
  color: var(--primary-color);
  margin-bottom: 15px;
}

.info-card h3 {
  margin-top: 0;
  color: var(--primary-color);
}

/* Lists */
ul, ol {
  margin: 20px 0;
  padding-left: 25px;
}

li {
  margin-bottom: 10px;
  color: var(--text-light);
  line-height: 1.6;
}

ul.checklist {
  list-style: none;
  padding-left: 0;
}

ul.checklist li:before {
  content: '✓';
  color: var(--success-color);
  font-weight: bold;
  margin-right: 10px;
}

/* Images */
.content-image {
  max-width: 100%;
  height: auto;
  border-radius: 12px;
  box-shadow: var(--shadow-md);
  margin: 30px 0;
}

.image-caption {
  font-size: 0.9rem;
  color: var(--text-light);
  text-align: center;
  margin-top: 10px;
  font-style: italic;
}

/* Footer */
.footer {
  background-color: var(--text-dark);
  color: rgba(255,255,255,0.8);
  padding: 50px 0 20px;
}

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

.footer-section h3 {
  color: var(--white);
  margin-bottom: 20px;
  font-size: 1.2rem;
}

.footer-links {
  list-style: none;
  padding: 0;
}

.footer-links li {
  margin-bottom: 12px;
}

.footer-links a {
  color: rgba(255,255,255,0.8);
  text-decoration: none;
  transition: color 0.3s;
}

.footer-links a:hover {
  color: var(--secondary-color);
}

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-top: 25px;
  text-align: center;
  font-size: 0.9rem;
}

.disclaimer {
  background: rgba(255,255,255,0.05);
  border-left: 4px solid var(--secondary-color);
  padding: 15px;
  margin: 20px 0;
  border-radius: 5px;
  font-size: 0.9rem;
}

/* Mobile Menu Toggle */
.mobile-menu-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--text-dark);
}

/* Responsive Design */
@media (max-width: 968px) {
  .hero-content {
    grid-template-columns: 1fr;
  }
  
  .nav-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--white);
    flex-direction: column;
    padding: 20px;
    box-shadow: var(--shadow-md);
  }
  
  .nav-menu.active {
    display: flex;
  }
  
  .mobile-menu-toggle {
    display: block;
  }
  
}

@media (max-width: 768px) {
  h1 {
    font-size: 2rem;
  }
  
  h2 {
    font-size: 1.6rem;
  }
  
  .hero-text h1 {
    font-size: 2.2rem;
  }
  
  .hero {
    min-height: 500px;
    padding: 50px 0;
  }
  
  .info-cards {
    grid-template-columns: 1fr;
  }
  
  .footer-content {
    grid-template-columns: 1fr;
    gap: 30px;
  }
  
  .hero-cta {
    flex-direction: column;
  }
  
  .cta-btn {
    width: 100%;
    text-align: center;
  }
}

/* Discovery block placed directly under hero */
.hero + .section.section-light .widget-container {
  margin-top: 16px;
}

/* Widgets Styling */
.widget-container {
  margin: 40px 0;
  background: var(--white);
  border-radius: 12px;
  padding: 30px;
  box-shadow: var(--shadow-md);
}

.widget-container h3 {
  margin-top: 0;
  text-align: center;
  color: var(--primary-color);
}

/* Accessibility */
.skip-link {
  position: absolute;
  top: -40px;
  left: 0;
  background: var(--primary-color);
  color: var(--white);
  padding: 8px;
  text-decoration: none;
  z-index: 100;
}

.skip-link:focus {
  top: 0;
}
