/* 
    Instituto Brasileiro Farei Joias - Design System
    "Institutional & Prestigious" Philosophy
*/

:root {
    /* Colors - Brand Identity */
    --brand-purple: #4B1A5D; /* Royal Purple from Logo */
    --brand-gold: #D4AF37; /* Metallic Gold from Logo */
    --brand-gold-light: #F4E0A1;
    
    --bg-main: #FCFAFA;
    --bg-white: #FFFFFF;
    --bg-surface: #F8F4F9;
    
    --text-main: #2D2D2D;
    --text-muted: #5A5A5A;
    --text-light: #FFFFFF;

    /* Spacing */
    --section-gap: 120px;
    --gutter: 24px;
    --margin-edge: 64px;
    --container-max: 1440px;

    /* Typography */
    --font-display: 'Noto Serif', serif;
    --font-body: 'Manrope', sans-serif;
}

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

body {
    background-color: var(--bg-main);
    color: var(--text-main);
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

h1, h2, h3, h4 {
    font-family: var(--font-display);
    font-weight: 400;
    color: var(--brand-purple);
}

a {
    text-decoration: none;
    color: inherit;
    transition: all 0.4s ease;
}

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

/* Layout Utilities */
.container {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 var(--margin-edge);
}

.section {
    padding: var(--section-gap) 0;
}

.grid {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: var(--gutter);
}

/* Header - White Top */
nav {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    background: var(--bg-white);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.03);
    transition: all 0.5s ease;
}

nav .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 100px;
}

.logo-container {
    display: flex;
    align-items: center;
    gap: 16px;
}

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

.nav-links {
    display: flex;
    gap: 40px;
}

.nav-links a {
    font-family: var(--font-display);
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-muted);
}

.nav-links a:hover, .nav-links a.active {
    color: var(--brand-purple);
}

/* Removed .btn-cta as requested */

/* Hero Slideshow */
.hero-slider {
    position: relative;
    height: 100vh;
    width: 100%;
    background: #fff;
    overflow: hidden;
}

.slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    visibility: hidden;
    transition: opacity 1.5s ease, visibility 1.5s ease;
}

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

.slide-bg {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 26vh 34vw; /* Even more scale down on larger screens for editorial feel */
    opacity: 1;
}

.slide-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
}

.slide-content {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    align-items: center;
    width: 100%;
}

.slide-portrait-col {
    position: absolute;
    bottom: 10%;
    right: 20%;
    display: flex;
    flex-direction: column;
    align-items: center;
    z-index: 10;
}

.portrait-frame {
    width: 130px; /* Smaller size */
    height: 130px;
    border-radius: 50%; /* Making it circular for a cleaner professional look */
    border: 3px solid var(--brand-gold);
    padding: 0;
    margin-bottom: 1rem;
    position: relative;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}

.portrait-frame img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.slide-info-col {
    grid-column: 1 / span 8; /* Descriptions on the left */
    display: none;
}

.slide-title {
    font-size: 4rem;
    color: var(--text-light);
    margin-bottom: 1.5rem;
    line-height: 1.1;
}

.slide-desc {
    font-size: 1.25rem;
    color: rgba(255, 255, 255, 0.8);
    max-width: 500px;
}

/* Slider Controls */
.slider-nav {
    position: absolute;
    bottom: 40px;
    right: var(--margin-edge);
    display: flex;
    gap: 16px;
}

.slider-dot {
    width: 40px;
    height: 2px;
    background: rgba(0, 0, 0, 0.3);
    cursor: pointer;
    transition: all 0.4s ease;
}

.slider-dot.active {
    background: var(--brand-gold);
    width: 80px;
}

/* Typography & Components */
.text-label {
    font-size: 0.8rem;
    letter-spacing: 0.25em;
    text-transform: uppercase;
    color: var(--brand-gold);
    display: block;
    margin-bottom: 1.5rem;
}

.text-en {
    font-style: italic;
    opacity: 0.6;
    display: block;
    font-size: 0.85em;
    font-weight: 300;
    margin-top: 0.3em;
    font-family: var(--font-body);
}

.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 1s cubic-bezier(0.2, 0.8, 0.2, 1);
}

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

/* Mobile Menu Toggle */
.menu-toggle {
    display: none;
    flex-direction: column;
    gap: 6px;
    cursor: pointer;
    z-index: 1100;
}

.menu-toggle span {
    display: block;
    width: 28px;
    height: 2px;
    background: var(--brand-purple);
    transition: all 0.3s ease;
}

/* Responsive */
@media (max-width: 1024px) {
    :root {
        --margin-edge: 32px;
    }

    .grid > div {
        grid-column: span 12 !important;
    }

    .slide-title {
        font-size: 2.5rem;
    }
    
    .slide-bg {
        padding: 5vh 5vw; /* Slightly larger on mobile */
    }

    .slide-portrait-col {
        display: flex;
        bottom: 80px;
        right: 20px;
    }
    
    .portrait-frame {
        width: 90px;
        height: 90px;
    }
    
    .slide-info-col {
        grid-column: span 12;
    }

    .nav-links {
        position: fixed;
        top: 0;
        right: -100%;
        width: 80%;
        height: 100vh;
        background: var(--bg-white);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        transition: all 0.5s cubic-bezier(0.77, 0, 0.175, 1);
        box-shadow: -10px 0 30px rgba(0,0,0,0.05);
        z-index: 1000;
    }

    .nav-links.active {
        right: 0;
    }

    .menu-toggle {
        display: flex;
    }

    /* Hamburger Animation */
    .menu-toggle.active span:nth-child(1) {
        transform: translateY(8px) rotate(45deg);
    }
    .menu-toggle.active span:nth-child(2) {
        opacity: 0;
    }
    .menu-toggle.active span:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
    }
}

@media (max-width: 768px) {
    .slider-nav {
        bottom: 20px;
        right: 50%;
        transform: translateX(50%);
    }

    /* Mobile Grid Reset */
    .grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    /* Ensure grid spans don't break layout on mobile */
    .grid > div {
        grid-column: span 1 !important;
    }

    .section {
        padding: 60px 0;
    }

    .display-xl {
        font-size: 2.5rem;
    }

    .display-lg {
        font-size: 2rem;
    }
}

/* Footer - Sophisticated Grey */
.footer {
    padding: 100px 0 60px;
    background-color: #1a1a1a !important; /* Force Sophisticated Dark Footer */
    color: #ffffff !important;
    border-top: none;
}

.footer .text-label {
    color: var(--brand-gold) !important;
}

.footer .body-text {
    color: rgba(255,255,255,0.5);
}

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

.footer-links li {
    margin-bottom: 1rem;
}

.footer-links a {
    font-size: 0.9rem;
    color: rgba(255,255,255,0.6);
    transition: all 0.3s ease;
    display: inline-block;
}

.footer-links a:hover {
    color: var(--brand-gold);
    transform: translateX(5px);
}

.copyright {
    font-size: 0.85rem;
    color: rgba(255,255,255,0.3);
}

/* Navigation Uppercase */
.nav-links a {
    text-transform: uppercase;
    letter-spacing: 0.15em;
    font-size: 0.75rem;
}

/* Form Styles */
.form-container {
    max-width: 800px;
    margin: 0 auto;
    background: var(--bg-white);
    padding: 60px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.03);
}

.form-group {
    margin-bottom: 24px;
}

.form-group label {
    display: block;
    font-family: var(--font-display);
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 8px;
    color: var(--brand-purple);
}

.form-group input, .form-group textarea, .form-group select {
    width: 100%;
    padding: 12px 0;
    border: none;
    border-bottom: 1px solid rgba(0,0,0,0.1);
    background: transparent;
    font-family: var(--font-body);
    font-size: 1rem;
    color: var(--text-main);
    transition: all 0.3s ease;
}

.form-group input:focus, .form-group textarea:focus {
    outline: none;
    border-bottom-color: var(--brand-gold);
}

.btn-submit {
    display: inline-block;
    padding: 16px 40px;
    background: var(--brand-purple);
    color: var(--text-light);
    font-family: var(--font-display);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    cursor: pointer;
    transition: all 0.4s ease;
    border: none;
    margin-top: 20px;
}

.btn-submit:hover {
    background: var(--brand-gold);
    transform: translateY(-2px);
}

/* Final Mobile Polish */
@media (max-width: 768px) {
    .container {
        padding: 0 20px;
    }
    
    .form-container {
        padding: 40px 20px;
    }
    
    .section {
        padding: 80px 0;
    }
}

/* Home Page - Luxury 2026 Refinement */

/* Anti-Grid Exhibition System */
.exhibition-staggered {
    display: flex;
    flex-direction: column;
    gap: 15rem; /* Large vertical breathing room */
}

.exhibition-item {
    display: flex;
    align-items: center;
    position: relative;
    width: 100%;
}

.exhibition-item:nth-child(even) {
    flex-direction: row-reverse;
}

.exhibition-media {
    width: 60%;
    position: relative;
}

.exhibition-item:nth-child(even) .exhibition-media {
    left: 5%;
}

.exhibition-item:nth-child(odd) .exhibition-media {
    left: -5%;
}

.exhibition-year-bg {
    position: absolute;
    top: -10%;
    font-family: var(--font-display);
    font-size: 20rem;
    font-weight: 700;
    line-height: 1;
    color: transparent;
    -webkit-text-stroke: 1px rgba(75, 26, 93, 0.05); /* Very subtle brand purple outline */
    z-index: -1;
    pointer-events: none;
    user-select: none;
}

.exhibition-item:nth-child(even) .exhibition-year-bg {
    right: -10%;
}

.exhibition-item:nth-child(odd) .exhibition-year-bg {
    left: -10%;
}

.exhibition-info {
    width: 40%;
    padding: 60px;
    background: var(--bg-white);
    box-shadow: 0 40px 100px rgba(0,0,0,0.08);
    position: absolute;
    z-index: 10;
    backdrop-filter: blur(20px);
}

.exhibition-item:nth-child(odd) .exhibition-info {
    right: 0;
}

.exhibition-item:nth-child(even) .exhibition-info {
    left: 0;
}

/* Statement Statement (Cinematic Quotes) */
.statement-slider {
    min-height: 80vh;
    display: flex;
    align-items: center;
    background: var(--brand-purple); /* Royal Dark */
    color: var(--text-light);
    position: relative;
    overflow: hidden;
}

.statement-pattern {
    position: absolute;
    inset: 0;
    opacity: 0.03;
    background-image: radial-gradient(var(--brand-gold) 1px, transparent 1px);
    background-size: 40px 40px;
}

.statement-content {
    max-width: 1000px;
    margin: 0 auto;
    position: relative;
    z-index: 2;
    padding: 100px 20px;
}

.statement-text {
    font-family: var(--font-display);
    font-size: clamp(1.25rem, 3vw, 2rem);
    line-height: 1.5;
    font-style: italic;
    margin-bottom: 3rem;
    opacity: 0;
    transform: translateY(20px);
    transition: all 1.2s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.statement-slider.active .statement-text {
    opacity: 1;
    transform: translateY(0);
}

.statement-author {
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.3em;
    color: var(--brand-gold);
    display: block;
}

/* Immersive Cinema Gallery */
.cinema-gallery {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 4px; /* Minimal gaps for "contact sheet" feel */
    background: #000;
}

.cinema-item {
    position: relative;
    overflow: hidden;
    aspect-ratio: 16/9;
}

.cinema-item.featured {
    grid-row: span 2;
}

.cinema-item.cta-box {
    grid-column: 1 / -1;
    aspect-ratio: auto;
    padding: 60px 20px;
}

.cinema-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(0,0,0,0.8) 0%, transparent 50%);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 30px;
    opacity: 0.6;
    transition: opacity 0.5s ease;
}

.cinema-item:hover .cinema-overlay {
    opacity: 1;
}

/* Responsive Overrides 2026 */
@media (max-width: 1024px) {
    .exhibition-staggered {
        gap: 8rem;
    }

    .exhibition-item {
        flex-direction: column !important;
    }
    
    .exhibition-media {
        width: 100%;
        left: 0 !important;
    }
    
    .exhibition-info {
        position: relative;
        width: 90%;
        margin-top: -60px;
        margin-left: auto;
        margin-right: auto;
        padding: 40px;
    }
    
    .exhibition-year-bg {
        font-size: 10rem;
        top: -5%;
    }
}

/* Home Page - Interactive Components 2026 */

/* Student Testimonial Navigation */
.testimonial-nav {
    display: flex;
    gap: 20px;
    margin-top: 50px;
    justify-content: center;
    flex-wrap: wrap;
}

.student-thumb {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    overflow: hidden;
    cursor: pointer;
    border: 2px solid transparent;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    filter: grayscale(1);
    opacity: 0.5;
}

.student-thumb:hover {
    opacity: 1;
    transform: scale(1.1);
}

.student-thumb.active {
    filter: grayscale(0);
    opacity: 1;
    border-color: var(--brand-gold);
    transform: scale(1.2);
}

.student-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Video Lightbox System */
.video-trigger {
    cursor: pointer;
    position: relative;
    width: 100%;
    height: 100%;
}

.play-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 80px;
    height: 80px;
    background: rgba(255,255,255,0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 5;
    transition: all 0.5s ease;
}

.video-trigger:hover .play-icon {
    background: var(--brand-gold);
    transform: translate(-50%, -50%) scale(1.1);
}

.play-icon::after {
    content: '';
    width: 0;
    height: 0;
    border-top: 12px solid transparent;
    border-bottom: 12px solid transparent;
    border-left: 20px solid #fff;
    margin-left: 5px;
}

.lightbox {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.95);
    z-index: 1000;
    display: none; /* Hidden by default */
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(20px);
    opacity: 0;
    transition: opacity 0.5s ease;
}

.lightbox.active {
    display: flex;
    opacity: 1;
}

.lightbox-content {
    width: 90%;
    max-width: 1200px;
    aspect-ratio: 16/9;
    background: #000;
    position: relative;
    transform: scale(0.9);
    transition: transform 0.5s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.lightbox.active .lightbox-content {
    transform: scale(1);
}

.lightbox-close {
    position: absolute;
    top: 30px;
    right: 30px;
    color: #fff;
    font-size: 2.8rem;
    cursor: pointer;
    font-family: var(--font-body);
    opacity: 0.75;
    transition: opacity 0.3s;
    z-index: 1020;
    line-height: 1;
}

.lightbox-close:hover {
    opacity: 1;
}

/* Gallery Lightbox Styles */
.gallery-lightbox .lightbox-content {
    background: none;
    width: auto;
    max-width: 90%;
    height: auto;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    aspect-ratio: auto;
    transform: scale(0.95);
}

.gallery-lightbox.active .lightbox-content {
    transform: scale(1);
}

.gallery-lightbox .lightbox-content img {
    max-width: 100%;
    max-height: 70vh;
    object-fit: contain;
    box-shadow: 0 0 40px rgba(0,0,0,0.5);
    animation: zoomIn 0.3s ease;
}

.gallery-lightbox .lightbox-caption {
    margin-top: 20px;
    color: var(--brand-gold);
    font-family: 'Noto Serif', serif;
    font-size: 1.25rem;
    font-style: italic;
    text-align: center;
    position: static;
    background: none;
    padding: 0;
    z-index: 1010;
}

.gallery-lightbox .lightbox-prev,
.gallery-lightbox .lightbox-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: rgba(255,255,255,0.5);
    font-size: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    padding: 20px;
    z-index: 1010;
}

.gallery-lightbox .lightbox-prev:hover,
.gallery-lightbox .lightbox-next:hover {
    color: white;
}

.gallery-lightbox .lightbox-prev { left: -80px; }
.gallery-lightbox .lightbox-next { right: -80px; }

@keyframes zoomIn {
    from { transform: scale(0.95); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

@media (max-width: 1360px) {
    .gallery-lightbox .lightbox-prev { left: 10px; font-size: 40px; background: rgba(0,0,0,0.4); border-radius: 50%; padding: 10px 15px; }
    .gallery-lightbox .lightbox-next { right: 10px; font-size: 40px; background: rgba(0,0,0,0.4); border-radius: 50%; padding: 10px 15px; }
}

@media (max-width: 1200px) {
    .lightbox-close {
        top: 20px;
        right: 20px;
        font-size: 2.2rem;
    }
}
