/* ===================================
   SANTO CASTORO - CSS
   Authentic Italian Pizzeria Website
   =================================== */

/* CSS Custom Properties */
:root {
    /* Colors */
    --color-forest: #1B4D3E;
    --color-forest-dark: #143830;
    --color-cream: #F5F0E6;
    --color-cream-dark: #EAE3D5;
    --color-tomato: #C41E3A;
    --color-tomato-dark: #A11830;
    --color-gold: #D4A017;
    --color-gold-light: #E8BE4A;
    --color-charcoal: #2D2D2D;
    --color-gray: #6B6B6B;
    --color-gray-light: #9B9B9B;
    --color-white: #FFFFFF;

    /* Typography */
    --font-display: 'Playfair Display', Georgia, serif;
    --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;

    /* Spacing */
    --space-xs: 0.5rem;
    --space-sm: 1rem;
    --space-md: 1.5rem;
    --space-lg: 2rem;
    --space-xl: 3rem;
    --space-2xl: 4rem;
    --space-3xl: 6rem;

    /* Border Radius */
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --radius-xl: 20px;

    /* Shadows */
    --shadow-sm: 0 2px 8px rgba(0,0,0,0.08);
    --shadow-md: 0 4px 16px rgba(0,0,0,0.12);
    --shadow-lg: 0 8px 32px rgba(0,0,0,0.16);
    --shadow-xl: 0 16px 48px rgba(0,0,0,0.2);

    /* Transitions */
    --transition-fast: 150ms ease;
    --transition-base: 250ms ease;
    --transition-slow: 400ms ease;
}

/* Reset & Base */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 1.6;
    color: var(--color-charcoal);
    background-color: var(--color-cream);
    overflow-x: hidden;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    color: inherit;
    text-decoration: none;
}

button {
    font-family: inherit;
    cursor: pointer;
    border: none;
    background: none;
}

/* Typography */
h1, h2, h3 {
    font-family: var(--font-display);
    font-weight: 700;
    line-height: 1.2;
}

/* Container */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--space-md);
}

/* Section Titles */
.section-title {
    font-size: clamp(1.75rem, 5vw, 2.5rem);
    color: var(--color-forest);
    text-align: center;
    margin-bottom: var(--space-sm);
}

.section-subtitle {
    font-size: clamp(0.95rem, 2vw, 1.1rem);
    color: var(--color-gray);
    text-align: center;
    max-width: 600px;
    margin: 0 auto var(--space-xl);
}

/* ===================================
   HERO SECTION
   =================================== */
.hero {
    position: relative;
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: var(--space-xl) var(--space-md);
    overflow: hidden;
}

.hero-bg {
    position: absolute;
    inset: 0;
    z-index: -2;
}

.hero-bg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    z-index: -1;
    background: linear-gradient(
        180deg,
        rgba(27, 77, 62, 0.85) 0%,
        rgba(20, 56, 48, 0.92) 50%,
        rgba(27, 77, 62, 0.95) 100%
    );
}

.hero-content {
    text-align: center;
    color: var(--color-white);
    max-width: 600px;
}

.hero-title {
    font-size: clamp(2.5rem, 10vw, 4.5rem);
    font-weight: 700;
    letter-spacing: 0.02em;
    margin-bottom: var(--space-xs);
    text-shadow: 0 4px 20px rgba(0,0,0,0.3);
}

.hero-subtitle {
    font-size: clamp(1rem, 3vw, 1.35rem);
    font-weight: 400;
    opacity: 0.9;
    margin-bottom: var(--space-lg);
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.rating-badge {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-xs);
    background: rgba(255,255,255,0.1);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    padding: var(--space-sm) var(--space-lg);
    border-radius: var(--radius-xl);
    border: 1px solid rgba(255,255,255,0.2);
    margin-bottom: var(--space-xl);
}

.stars {
    display: flex;
    gap: 4px;
}

.star {
    color: var(--color-gold);
    font-size: 1.25rem;
}

.rating-text {
    font-size: 1rem;
    font-weight: 600;
}

.review-count {
    opacity: 0.8;
    font-weight: 400;
}

.hero-cta {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-sm);
    justify-content: center;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    gap: var(--space-xs);
    padding: var(--space-sm) var(--space-lg);
    font-size: 1rem;
    font-weight: 600;
    border-radius: var(--radius-lg);
    transition: all var(--transition-base);
}

.btn .icon {
    width: 20px;
    height: 20px;
}

.btn-primary {
    background: var(--color-tomato);
    color: var(--color-white);
    box-shadow: 0 4px 20px rgba(196, 30, 58, 0.4);
}

.btn-primary:hover {
    background: var(--color-tomato-dark);
    transform: translateY(-2px);
    box-shadow: 0 6px 24px rgba(196, 30, 58, 0.5);
}

.btn-secondary {
    background: rgba(255,255,255,0.15);
    color: var(--color-white);
    border: 2px solid rgba(255,255,255,0.3);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.btn-secondary:hover {
    background: rgba(255,255,255,0.25);
    border-color: rgba(255,255,255,0.5);
}

.scroll-indicator {
    position: absolute;
    bottom: var(--space-lg);
    left: 50%;
    transform: translateX(-50%);
    color: var(--color-white);
    opacity: 0.6;
    animation: bounce 2s infinite;
}

.scroll-indicator svg {
    width: 32px;
    height: 32px;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% { transform: translateX(-50%) translateY(0); }
    40% { transform: translateX(-50%) translateY(-10px); }
    60% { transform: translateX(-50%) translateY(-5px); }
}

/* ===================================
   GALLERY SECTION
   =================================== */
.gallery {
    padding: var(--space-3xl) 0;
    background: var(--color-white);
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-sm);
}

.gallery-item {
    position: relative;
    aspect-ratio: 1;
    overflow: hidden;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: transform var(--transition-base);
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition-slow);
}

.gallery-item:hover {
    transform: scale(1.02);
}

.gallery-item:hover img {
    transform: scale(1.08);
}

/* ===================================
   REVIEWS SECTION
   =================================== */
.reviews {
    padding: var(--space-3xl) 0;
    background: var(--color-forest);
}

.reviews .section-title {
    color: var(--color-white);
}

.reviews-grid {
    display: grid;
    gap: var(--space-md);
}

.review-card {
    background: var(--color-white);
    border-radius: var(--radius-lg);
    padding: var(--space-lg);
    box-shadow: var(--shadow-md);
}

.review-header {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    margin-bottom: var(--space-sm);
}

.review-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--color-forest);
    color: var(--color-white);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.9rem;
    flex-shrink: 0;
}

.review-author {
    font-family: var(--font-body);
    font-size: 1rem;
    font-weight: 600;
    color: var(--color-charcoal);
}

.review-stars {
    color: var(--color-gold);
    font-size: 0.9rem;
    letter-spacing: 2px;
}

.review-text {
    font-size: 0.95rem;
    line-height: 1.7;
    color: var(--color-charcoal);
    font-style: italic;
    margin-bottom: var(--space-sm);
}

.review-date {
    font-size: 0.8rem;
    color: var(--color-gray-light);
}

/* ===================================
   CONTACT SECTION
   =================================== */
.contact {
    padding: var(--space-3xl) 0;
    background: var(--color-cream);
}

.contact-grid {
    display: grid;
    gap: var(--space-lg);
}

.hours-card,
.info-card {
    background: var(--color-white);
    border-radius: var(--radius-lg);
    padding: var(--space-lg);
    box-shadow: var(--shadow-sm);
}

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

.hours-table td {
    padding: var(--space-xs) 0;
    border-bottom: 1px solid var(--color-cream-dark);
}

.hours-table td:last-child {
    text-align: right;
    font-weight: 500;
    color: var(--color-forest);
}

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

.hours-table tr.closed td {
    color: var(--color-gray-light);
}

.hours-table tr.closed td:last-child {
    color: var(--color-tomato);
}

.info-card h3 {
    font-size: 1.25rem;
    color: var(--color-forest);
    margin-bottom: var(--space-md);
}

.contact-item {
    display: flex;
    align-items: flex-start;
    gap: var(--space-sm);
    margin-bottom: var(--space-md);
}

.contact-item .icon {
    width: 24px;
    height: 24px;
    color: var(--color-forest);
    flex-shrink: 0;
    margin-top: 2px;
}

.contact-item a {
    color: var(--color-charcoal);
    font-weight: 500;
    transition: color var(--transition-fast);
}

.contact-item a:hover {
    color: var(--color-forest);
}

.attributes {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-xs);
    margin-top: var(--space-md);
    padding-top: var(--space-md);
    border-top: 1px solid var(--color-cream-dark);
}

.attribute {
    font-size: 0.85rem;
    padding: var(--space-xs) var(--space-sm);
    background: var(--color-cream);
    border-radius: var(--radius-sm);
}

/* ===================================
   FOOTER
   =================================== */
.footer {
    background: var(--color-forest-dark);
    color: var(--color-white);
    padding: var(--space-xl) 0 var(--space-md);
}

.footer-content {
    display: flex;
    flex-direction: column;
    gap: var(--space-lg);
    padding-bottom: var(--space-lg);
    border-bottom: 1px solid rgba(255,255,255,0.1);
    margin-bottom: var(--space-md);
}

.footer-logo {
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 700;
}

.footer-tagline {
    opacity: 0.7;
    font-size: 0.9rem;
    margin-top: var(--space-xs);
}

.footer-contact {
    text-align: left;
}

.footer-phone {
    display: block;
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: var(--space-xs);
    transition: color var(--transition-fast);
}

.footer-phone:hover {
    color: var(--color-gold);
}

.footer address {
    font-style: normal;
    opacity: 0.7;
    font-size: 0.9rem;
}

.footer-bottom {
    text-align: center;
    font-size: 0.85rem;
    opacity: 0.6;
}

/* ===================================
   LIGHTBOX
   =================================== */
.lightbox {
    position: fixed;
    inset: 0;
    z-index: 1000;
    background: rgba(0,0,0,0.95);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-base);
}

.lightbox.active {
    opacity: 1;
    visibility: visible;
}

.lightbox-close {
    position: absolute;
    top: var(--space-md);
    right: var(--space-md);
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-white);
    background: rgba(255,255,255,0.1);
    border-radius: 50%;
    transition: background var(--transition-fast);
    z-index: 10;
}

.lightbox-close:hover {
    background: rgba(255,255,255,0.2);
}

.lightbox-close svg {
    width: 24px;
    height: 24px;
}

.lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-white);
    background: rgba(255,255,255,0.1);
    border-radius: 50%;
    transition: background var(--transition-fast);
    z-index: 10;
}

.lightbox-nav:hover {
    background: rgba(255,255,255,0.2);
}

.lightbox-nav svg {
    width: 28px;
    height: 28px;
}

.lightbox-prev {
    left: var(--space-md);
}

.lightbox-next {
    right: var(--space-md);
}

.lightbox-content {
    max-width: 90%;
    max-height: 90vh;
}

.lightbox-image {
    max-width: 100%;
    max-height: 90vh;
    object-fit: contain;
    border-radius: var(--radius-md);
}

/* ===================================
   RESPONSIVE BREAKPOINTS
   =================================== */

/* Tablet (768px) */
@media (min-width: 768px) {
    .gallery-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: var(--space-md);
    }

    .reviews-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--space-lg);
    }

    .contact-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .footer-content {
        flex-direction: row;
        justify-content: space-between;
        align-items: flex-start;
    }

    .footer-contact {
        text-align: right;
    }

    .rating-badge {
        flex-direction: row;
        gap: var(--space-md);
    }
}

/* Desktop (1024px) */
@media (min-width: 1024px) {
    .container {
        padding: 0 var(--space-xl);
    }

    .reviews-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .gallery-grid {
        gap: var(--space-lg);
    }

    .gallery-item {
        border-radius: var(--radius-lg);
    }

    .hero-cta {
        gap: var(--space-md);
    }

    .btn {
        padding: var(--space-sm) var(--space-xl);
    }
}

/* Large screens (1200px+) */
@media (min-width: 1200px) {
    .gallery-item:first-child {
        grid-column: span 2;
        grid-row: span 2;
    }
}

/* Reduce motion */
@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
