/* ============================================
   Estacio Servei Llucanes — Custom Styles
   ============================================ */

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

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    margin: 0;
    overflow-x: hidden;
}

/* --- Scrollbar --- */
main::-webkit-scrollbar {
    width: 6px;
}
main::-webkit-scrollbar-track {
    background: transparent;
}
main::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.15);
    border-radius: 3px;
}
main::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 0, 0, 0.25);
}

/* --- Section base --- */
section {
    position: relative;
}

/* --- Hero --- */
.section-hero {
    position: relative;
}

.hero-bg {
    will-change: transform;
}

.hero-overlay {
    background: linear-gradient(
        135deg,
        rgba(22, 29, 13, 0.92) 0%,
        rgba(42, 54, 25, 0.82) 50%,
        rgba(58, 77, 35, 0.65) 100%
    );
}

/* --- Section Eyebrow --- */
.section-eyebrow {
    display: block;
}

/* --- Section Title --- */
.section-title {
    font-family: 'Playfair Display', Georgia, serif;
}

/* --- Side Navigation --- */
.side-nav {
    position: sticky;
    top: 0;
    height: 100vh;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: rgba(255,255,255,0.1) transparent;
}

.side-nav::-webkit-scrollbar {
    width: 4px;
}
.side-nav::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,0.1);
    border-radius: 2px;
}

.nav-link {
    position: relative;
}

.nav-link.active .nav-dot {
    background: #f5f3ed !important;
    box-shadow: 0 0 0 3px rgba(245, 243, 237, 0.2);
}

.nav-link.active {
    background: rgba(255, 255, 255, 0.06) !important;
    color: #f5f3ed !important;
}

/* --- Service Cards --- */
.services-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2px;
}

@media (min-width: 1024px) {
    .services-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 0;
    }
}

.service-card {
    padding: 2.5rem;
    background: #faf9f6;
    border: 1px solid rgba(0, 0, 0, 0.04);
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    position: relative;
}

.service-card:first-child {
    grid-column: span 2;
}

@media (min-width: 1024px) {
    .service-card:first-child {
        grid-column: span 1;
    }
}

.service-card:hover {
    background: #ffffff;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.08);
    transform: translateY(-4px);
    z-index: 1;
}

.service-card-icon {
    color: #5a7533;
    transition: color 0.3s ease;
}

.service-card:hover .service-card-icon {
    color: #475f2a;
}

.service-card-title {
    font-family: 'Playfair Display', Georgia, serif;
}

.service-card-line {
    transition: width 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* --- About Image --- */
.about-image-wrapper {
    box-shadow: 0 32px 64px rgba(0, 0, 0, 0.2);
}

/* --- Gallery --- */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

@media (min-width: 768px) {
    .gallery-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 1.25rem;
    }
}

.gallery-item {
    border-radius: 12px;
    overflow: hidden;
    aspect-ratio: 3 / 2;
    background: #ebe8df;
    position: relative;
}

.gallery-item::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(26, 29, 13, 0.2) 0%, transparent 50%);
    opacity: 0;
    transition: opacity 0.4s ease;
}

.gallery-item:hover::after {
    opacity: 1;
}

.gallery-img {
    transition: transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

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

/* --- Contact Form --- */
.input-field {
    transition: all 0.25s ease;
}

.input-field:focus {
    border-color: #5a7533;
    box-shadow: 0 0 0 3px rgba(90, 117, 51, 0.1);
}

.input-field::placeholder {
    color: #bfb7a3;
}

.btn-submit {
    transition: all 0.3s ease;
}

.btn-submit:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 24px rgba(48, 64, 29, 0.3);
}

.btn-submit:active {
    transform: translateY(0);
}

/* --- Buttons --- */
.btn-primary, .btn-secondary, .btn-cta {
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* --- Contact Info --- */
.contact-info-item {
    padding-bottom: 1.5rem;
    border-bottom: 1px solid #ebe8df;
}

.contact-info-item:last-child {
    border-bottom: none;
}

.contact-info-icon {
    color: #5a7533;
}

/* --- Footer --- */
.footer a {
    text-decoration: none;
}

/* --- Mobile Header --- */
.mobile-header {
    z-index: 50;
}

/* --- Mobile Menu --- */
.mobile-menu-overlay {
    transition: opacity 0.3s ease;
}

.mobile-menu-overlay.hidden {
    opacity: 0;
    pointer-events: none;
}

.mobile-menu-overlay:not(.hidden) {
    opacity: 1;
    pointer-events: auto;
}

.mobile-menu-link {
    font-family: 'Playfair Display', Georgia, serif;
    transition: all 0.2s ease;
}

.mobile-menu-link:hover {
    color: #5a7533;
}

/* --- Animations --- */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(24px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.hero-eyebrow {
    animation: fadeInUp 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94) 0.2s both;
}

.hero-title {
    animation: fadeInUp 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94) 0.4s both;
}

.hero-subtitle {
    animation: fadeInUp 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94) 0.6s both;
}

.hero-cta {
    animation: fadeInUp 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94) 0.8s both;
}

/* --- Scroll Reveal --- */
.reveal {
    opacity: 0;
    transform: translateY(32px);
    transition: all 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.reveal.revealed {
    opacity: 1;
    transform: translateY(0);
}

.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }
.reveal-delay-4 { transition-delay: 0.4s; }
.reveal-delay-5 { transition-delay: 0.5s; }
.reveal-delay-6 { transition-delay: 0.6s; }

/* --- Scroll Indicator --- */
.scroll-indicator {
    animation: fadeIn 1s ease 1.5s both;
}

/* --- Utility --- */
.text-shadow {
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

/* --- Selection --- */
::selection {
    background: rgba(90, 117, 51, 0.2);
    color: #1a1d0d;
}
