/* ===================================
   VARIABLES & RESET
   Paleta y tipografía según Guía de
   Identidad Visual AAG 2026
   =================================== */
:root {
    /* Colors - Paleta oficial AAG (Guía de marca) */
    --primary-color: #111111;      /* Negro AAG */
    --secondary-color: #A2A2A2;    /* Gris Editorial */
    --accent-color: #111111;       /* Negro - paleta monocromática */
    --text-primary: #111111;
    --text-secondary: #5A5A5A;
    --text-light: #A2A2A2;         /* Gris Editorial */
    --bg-white: #F4F4F2;           /* Blanco Mineral */
    --bg-light: #F1F1F1;           /* Blanco Gris */
    --bg-dark: #111111;            /* Negro AAG */
    --border-color: #E0E0E0;

    /* Typography - Helvetica (según guía de marca AAG)
       Bold = Títulos, Regular = Subtítulos/Cuerpo, Light = Notas */
    --font-primary: 'Helvetica Neue', Helvetica, Arial, sans-serif;
    --font-display: 'Helvetica Neue', Helvetica, Arial, sans-serif;

    /* Spacing */
    --section-padding: 120px;
    --container-width: 1200px;

    /* Transitions */
    --transition-fast: 0.2s ease;
    --transition-medium: 0.4s ease;
    --transition-slow: 0.6s ease;

    /* Shadows */
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.08);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.12);
    --shadow-xl: 0 20px 40px rgba(0, 0, 0, 0.15);
}

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

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--font-primary);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    background: var(--bg-white);
    font-weight: 400;
    text-align: justify;
}

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

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition-fast);
}

ul {
    list-style: none;
}

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

/* ===================================
   UTILITY CLASSES
   =================================== */
.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 40px;
}

.container-fluid {
    max-width: 100%;
    padding: 0 40px;
}

.gradient-text {
    color: var(--text-primary);
    font-weight: 700;
}

/* ===================================
   PRELOADER
   =================================== */
.preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--bg-light);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

.preloader.hidden {
    opacity: 0;
    visibility: hidden;
}

.loader {
    width: 50px;
    height: 50px;
    border: 2px solid var(--border-color);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ===================================
   NAVIGATION
   =================================== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: 25px 0;
    z-index: 1000;
    transition: var(--transition-medium);
    background: transparent;
}

.navbar.scrolled {
    background: rgba(244, 244, 242, 0.95);
    backdrop-filter: blur(10px);
    padding: 15px 0;
    box-shadow: var(--shadow-sm);
}

.nav-wrapper {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo-img {
    height: 50px;
    transition: var(--transition-fast);
}

.navbar.scrolled .logo-img {
    height: 40px;
}

.nav-menu {
    display: flex;
    gap: 40px;
    align-items: center;
}

.nav-link {
    font-size: 14px;
    font-weight: 400;
    color: var(--text-primary);
    position: relative;
    transition: var(--transition-fast);
    text-transform: uppercase;
    letter-spacing: 1px;
}

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

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

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

.menu-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    width: 30px;
    height: 24px;
    z-index: 1001;
}

.menu-toggle span {
    width: 100%;
    height: 2px;
    background: var(--text-primary);
    border-radius: 0;
    transition: var(--transition-fast);
}

.menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(8px, 8px);
}

.menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -7px);
}

/* ===================================
   HERO SECTION
   =================================== */
.hero {
    position: relative;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background: var(--bg-light);
}

.hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background:
        linear-gradient(135deg, rgba(244, 244, 242, 0.85), rgba(244, 244, 242, 0.8)),
        url('../assets/images/hero-bg.png') center/cover no-repeat;
    z-index: 1;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: transparent;
    z-index: 2;
}

.hero-content {
    position: relative;
    z-index: 3;
    text-align: center;
    color: var(--text-primary);
    max-width: 900px;
    margin: 0 auto;
}

.hero-title {
    font-family: var(--font-display);
    font-size: clamp(2.5rem, 6vw, 5rem);
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 30px;
    letter-spacing: -0.02em;
}

.hero-title .gradient-text {
    color: var(--text-primary);
}

.hero-subtitle {
    font-size: clamp(1rem, 2vw, 1.25rem);
    font-weight: 300;
    line-height: 1.8;
    margin-bottom: 40px;
    color: var(--text-secondary);
}

.hero-cta {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
}

/* Animations */
.animate-fade-up {
    opacity: 0;
    transform: translateY(30px);
    animation: fadeUp 0.8s ease forwards;
}

.delay-1 {
    animation-delay: 0.2s;
}

.delay-2 {
    animation-delay: 0.4s;
}

@keyframes fadeUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.scroll-indicator {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    gap: 5px;
    z-index: 3;
}

.scroll-indicator span {
    width: 1px;
    height: 15px;
    background: rgba(17, 17, 17, 0.4);
    animation: scrollDown 1.5s ease-in-out infinite;
}

.scroll-indicator span:nth-child(2) {
    animation-delay: 0.2s;
}

.scroll-indicator span:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes scrollDown {
    0%, 100% {
        opacity: 0;
        transform: translateY(0);
    }
    50% {
        opacity: 1;
        transform: translateY(10px);
    }
}

/* ===================================
   BUTTONS
   =================================== */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 35px;
    font-size: 13px;
    font-weight: 500;
    letter-spacing: 1px;
    text-transform: uppercase;
    border-radius: 0;
    transition: var(--transition-fast);
    cursor: pointer;
}

.btn-primary {
    background: var(--primary-color);
    color: var(--bg-white);
}

.btn-primary:hover {
    background: #333333;
    transform: translateY(-2px);
}

.btn-secondary {
    background: transparent;
    color: var(--text-primary);
    border: 1px solid var(--text-primary);
}

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

.btn-full {
    width: 100%;
    justify-content: center;
}

/* ===================================
   SECTION STYLING
   =================================== */
section {
    padding: var(--section-padding) 0;
}

.section-header {
    margin-bottom: 60px;
}

.section-header.center {
    text-align: center;
}

.section-subtitle {
    display: inline-block;
    font-size: 12px;
    font-weight: 400;
    text-transform: uppercase;
    letter-spacing: 3px;
    color: var(--text-light);
    margin-bottom: 15px;
}

.section-title {
    font-family: var(--font-display);
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.3;
    margin-bottom: 20px;
    letter-spacing: -0.02em;
}

.section-description {
    font-size: 16px;
    font-weight: 300;
    color: var(--text-secondary);
    line-height: 1.8;
    max-width: 700px;
    margin: 0 auto;
}

/* ===================================
   ABOUT SECTION
   =================================== */
.about {
    background: var(--bg-white);
}

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

.about-text {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.lead-text {
    font-size: 20px;
    font-weight: 400;
    color: var(--text-primary);
    line-height: 1.8;
}

.about-text p {
    font-size: 16px;
    font-weight: 300;
    color: var(--text-secondary);
    line-height: 1.8;
}

.about-features {
    display: flex;
    flex-direction: column;
    gap: 25px;
    margin-top: 30px;
}

.feature-item {
    display: flex;
    gap: 20px;
    align-items: flex-start;
}

.feature-icon {
    width: 50px;
    height: 50px;
    background: var(--primary-color);
    border-radius: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.feature-icon i {
    font-size: 22px;
    color: var(--bg-white);
}

.feature-content h3 {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 5px;
    color: var(--text-primary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.feature-content p {
    font-size: 14px;
    font-weight: 300;
    color: var(--text-secondary);
}

.about-image {
    position: relative;
}

.image-wrapper {
    position: relative;
    border-radius: 0;
    overflow: hidden;
    box-shadow: var(--shadow-lg);
}

.image-wrapper img {
    width: 100%;
    height: 600px;
    object-fit: cover;
}

.image-decoration {
    position: absolute;
    top: -30px;
    right: -30px;
    width: 200px;
    height: 200px;
    background: var(--primary-color);
    border-radius: 0;
    z-index: -1;
    opacity: 0.1;
}

/* ===================================
   SERVICES SECTION
   =================================== */
.services {
    background: var(--bg-light);
}

.services-columns {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
}

.services-column {
    background: var(--bg-white);
    padding: 50px;
    border: 1px solid var(--border-color);
    transition: var(--transition-medium);
}

.services-column:hover {
    border-color: var(--primary-color);
    box-shadow: var(--shadow-md);
}

.services-column-header {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 35px;
    padding-bottom: 25px;
    border-bottom: 1px solid var(--border-color);
}

.services-column-icon {
    width: 55px;
    height: 55px;
    background: var(--primary-color);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.services-column-icon i {
    font-size: 24px;
    color: var(--bg-white);
}

.services-column-header h3 {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-primary);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.services-list {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.services-list li {
    display: flex;
    align-items: center;
    gap: 15px;
    font-size: 15px;
    font-weight: 400;
    color: var(--text-secondary);
    letter-spacing: 0.3px;
}

.service-list-marker {
    width: 8px;
    height: 1px;
    background: var(--primary-color);
    flex-shrink: 0;
}

/* Legacy service cards (keep for projects page compatibility) */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 25px;
}

.service-card {
    background: var(--bg-white);
    padding: 40px;
    border-radius: 0;
    box-shadow: none;
    transition: var(--transition-medium);
    border: 1px solid var(--border-color);
}

.service-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
    border-color: var(--primary-color);
}

.service-icon {
    width: 60px;
    height: 60px;
    background: var(--primary-color);
    border-radius: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 25px;
}

.service-icon i {
    font-size: 28px;
    color: var(--bg-white);
}

.service-card h3 {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 15px;
    color: var(--text-primary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.service-card p {
    font-size: 15px;
    font-weight: 300;
    color: var(--text-secondary);
    line-height: 1.7;
}

/* ===================================
   PROJECTS SECTION
   =================================== */
.projects {
    background: var(--bg-white);
}

.projects-filter {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 50px;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 10px 28px;
    font-size: 12px;
    font-weight: 500;
    letter-spacing: 1px;
    text-transform: uppercase;
    background: transparent;
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
    border-radius: 0;
    transition: var(--transition-fast);
    cursor: pointer;
}

.filter-btn:hover,
.filter-btn.active {
    background: var(--primary-color);
    color: var(--bg-white);
    border-color: var(--primary-color);
}

.projects-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 30px;
}

.project-placeholder {
    grid-column: 1 / -1;
    background: var(--bg-light);
    border-radius: 0;
    padding: 80px 40px;
    text-align: center;
    border: 1px dashed var(--border-color);
}

.placeholder-content i {
    font-size: 60px;
    color: var(--text-light);
    margin-bottom: 20px;
}

.placeholder-content h3 {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 10px;
    color: var(--text-primary);
}

.placeholder-content p {
    font-size: 16px;
    color: var(--text-secondary);
}

/* Project Card */
.project-card {
    position: relative;
    border-radius: 0;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: box-shadow var(--transition-medium);
    cursor: pointer;
}

.project-card:hover {
    box-shadow: var(--shadow-lg);
}

.project-image {
    width: 100%;
    height: 500px;
    object-fit: cover;
    transition: transform 0.6s ease;
}

.project-card:hover .project-image {
    transform: scale(1.03);
}

.project-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 50%;
    background: linear-gradient(to top, rgba(17, 17, 17, 0.8), transparent);
    opacity: 0;
    transition: opacity var(--transition-medium);
}

.project-card:hover .project-overlay {
    opacity: 1;
}

.project-info {
    position: absolute;
    bottom: 35px;
    left: 40px;
    right: 40px;
    color: var(--bg-white);
    transform: translateY(15px);
    opacity: 0;
    transition: opacity var(--transition-medium), transform var(--transition-medium);
}

.project-card:hover .project-info {
    transform: translateY(0);
    opacity: 1;
}

.project-category {
    font-size: 11px;
    font-weight: 400;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 8px;
}

.project-title {
    font-size: 26px;
    font-weight: 700;
    margin-bottom: 0;
    letter-spacing: -0.01em;
}

.project-description {
    font-size: 14px;
    font-weight: 300;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.85);
    display: none;
}

/* ===================================
   CONTACT SECTION
   =================================== */
.contact {
    background: var(--bg-light);
}

.contact-wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 80px;
    align-items: start;
}

.contact-description {
    font-size: 16px;
    font-weight: 300;
    color: var(--text-secondary);
    line-height: 1.8;
    margin-bottom: 40px;
}

.contact-details {
    display: flex;
    flex-direction: column;
    gap: 30px;
    margin-bottom: 40px;
}

.contact-item {
    display: flex;
    gap: 20px;
    align-items: flex-start;
}

.contact-icon {
    width: 45px;
    height: 45px;
    background: var(--primary-color);
    border-radius: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.contact-icon i {
    font-size: 18px;
    color: var(--bg-white);
}

.contact-text h4 {
    font-size: 14px;
    font-weight: 700;
    margin-bottom: 5px;
    color: var(--text-primary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.contact-text p {
    font-size: 15px;
    font-weight: 300;
    color: var(--text-secondary);
}

.social-links {
    display: flex;
    gap: 12px;
}

.social-link {
    width: 42px;
    height: 42px;
    background: var(--bg-white);
    border-radius: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-primary);
    transition: var(--transition-fast);
    border: 1px solid var(--border-color);
}

.social-link:hover {
    background: var(--primary-color);
    color: var(--bg-white);
    border-color: var(--primary-color);
    transform: translateY(-3px);
}

/* Contact Form */
.contact-form-wrapper {
    background: var(--bg-white);
    padding: 50px;
    border-radius: 0;
    box-shadow: none;
    border: 1px solid var(--border-color);
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.form-group {
    position: relative;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 15px 20px;
    font-size: 15px;
    font-weight: 300;
    font-family: inherit;
    border: 1px solid var(--border-color);
    border-radius: 0;
    background: var(--bg-white);
    color: var(--text-primary);
    transition: var(--transition-fast);
    outline: none;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    border-color: var(--primary-color);
}

.form-group label {
    position: absolute;
    top: 50%;
    left: 20px;
    transform: translateY(-50%);
    font-size: 14px;
    font-weight: 300;
    color: var(--text-light);
    pointer-events: none;
    transition: var(--transition-fast);
    background: var(--bg-white);
    padding: 0 5px;
}

.form-group input:focus + label,
.form-group textarea:focus + label,
.form-group input:not(:placeholder-shown) + label,
.form-group textarea:not(:placeholder-shown) + label {
    top: 0;
    font-size: 11px;
    color: var(--primary-color);
    letter-spacing: 0.5px;
}

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

.form-group select {
    cursor: pointer;
}

/* ===================================
   FOOTER
   =================================== */
.footer {
    background: var(--bg-dark);
    color: #F4F4F2;
    padding: 80px 0 30px;
}

.footer-content {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 60px;
    margin-bottom: 50px;
}

.footer-logo {
    height: 50px;
    margin-bottom: 25px;
}

.footer-description {
    font-size: 14px;
    font-weight: 300;
    line-height: 1.8;
    color: rgba(255, 255, 255, 0.6);
}

.footer-column h4 {
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin-bottom: 20px;
}

.footer-links {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.footer-links a {
    font-size: 14px;
    font-weight: 300;
    color: rgba(255, 255, 255, 0.6);
    transition: var(--transition-fast);
}

.footer-links a:hover {
    color: #FFFFFF;
    padding-left: 5px;
}

.footer-social {
    display: flex;
    gap: 12px;
}

.footer-social .social-link {
    background: rgba(255, 255, 255, 0.1);
    color: var(--bg-white);
    border-color: rgba(255, 255, 255, 0.15);
}

.footer-social .social-link:hover {
    background: #FFFFFF;
    color: var(--primary-color);
    border-color: #FFFFFF;
}

.footer-bottom {
    padding-top: 30px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    text-align: center;
}

.footer-bottom p {
    font-size: 13px;
    font-weight: 300;
    color: rgba(255, 255, 255, 0.4);
    letter-spacing: 0.5px;
}

/* ===================================
   BACK TO TOP BUTTON
   =================================== */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 45px;
    height: 45px;
    background: var(--primary-color);
    color: var(--bg-white);
    border-radius: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-md);
    opacity: 0;
    visibility: hidden;
    transition: var(--transition-medium);
    z-index: 999;
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    background: #333333;
    transform: translateY(-5px);
}

/* ===================================
   RESPONSIVE DESIGN
   =================================== */

/* Tablets */
@media (max-width: 1024px) {
    :root {
        --section-padding: 80px;
    }

    .container,
    .container-fluid {
        padding: 0 30px;
    }

    .about-content,
    .contact-wrapper {
        grid-template-columns: 1fr;
        gap: 50px;
    }

    .footer-content {
        grid-template-columns: 1fr 1fr;
        gap: 40px;
    }
}

/* Mobile */
@media (max-width: 768px) {
    :root {
        --section-padding: 60px;
    }

    .container,
    .container-fluid {
        padding: 0 20px;
    }

    /* Navigation */
    .nav-menu {
        position: fixed;
        top: 0;
        right: -100%;
        width: 80%;
        max-width: 400px;
        height: 100vh;
        background: var(--bg-white);
        flex-direction: column;
        padding: 100px 40px;
        box-shadow: var(--shadow-xl);
        transition: var(--transition-medium);
        align-items: flex-start;
        gap: 30px;
    }

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

    .menu-toggle {
        display: flex;
    }

    /* Hero */
    .hero-cta {
        flex-direction: column;
        width: 100%;
    }

    .hero-cta .btn {
        width: 100%;
    }

    /* Services */
    .services-columns {
        grid-template-columns: 1fr;
    }

    .services-grid {
        grid-template-columns: 1fr;
    }

    /* Projects */
    .projects-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .project-image {
        height: 300px;
    }

    .project-info {
        left: 25px;
        right: 25px;
        bottom: 25px;
    }

    .project-title {
        font-size: 20px;
    }

    .projects-filter {
        flex-direction: column;
        align-items: stretch;
    }

    .filter-btn {
        width: 100%;
    }

    /* Contact */
    .contact-form-wrapper {
        padding: 30px;
    }

    /* Footer */
    .footer-content {
        grid-template-columns: 1fr;
        gap: 40px;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 2rem;
    }

    .section-title {
        font-size: 1.75rem;
    }

    .service-card,
    .contact-form-wrapper {
        padding: 25px;
    }
}

/* ===================================
   PROJECTS CTA (Index page)
   =================================== */
.projects-cta {
    text-align: center;
    margin-top: 50px;
}

/* ===================================
   PROJECTS PAGE STYLES
   =================================== */
/* Projects Page Body */
.projects-page {
    background: var(--bg-light);
}

.projects-page .footer {
    margin-top: 0;
}

.projects-hero {
    position: relative;
    height: 45vh;
    min-height: 350px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background: var(--bg-light);
}

.projects-hero .hero-bg {
    background:
        linear-gradient(135deg, rgba(17, 17, 17, 0.88), rgba(26, 26, 26, 0.85)),
        url('../assets/images/hero-bg.png') center/cover no-repeat;
}

.projects-hero .hero-content {
    padding-top: 60px;
}

.projects-hero .hero-title {
    font-size: clamp(2rem, 5vw, 3.5rem);
    margin-bottom: 15px;
}

.projects-hero .hero-subtitle {
    font-size: clamp(0.95rem, 1.5vw, 1.1rem);
    margin-bottom: 0;
}

/* Projects Showcase Section */
.projects-showcase {
    background: var(--bg-light);
    padding: var(--section-padding) 0;
}

.projects-showcase .projects-filter {
    margin-bottom: 50px;
}

.projects-showcase-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.projects-showcase-grid .project-card {
    aspect-ratio: 4/3;
}

.projects-showcase-grid .project-image {
    height: 100%;
    transition: none;
}

.projects-showcase-grid .project-card:hover .project-image {
    transform: none;
}

/* Project Card Enhanced for Projects Page */
.projects-showcase-grid .project-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.projects-showcase-grid .project-overlay {
    background: linear-gradient(to top, rgba(17, 17, 17, 0.9) 0%, rgba(17, 17, 17, 0.3) 50%, transparent 100%);
    height: 100%;
}

.projects-showcase-grid .project-description {
    display: block;
}

/* Staggered Animation */
.project-card.animate-stagger {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.project-card.animate-stagger.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ===================================
   PROJECT DETAIL VIEW (Expanded)
   =================================== */
.project-detail {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--bg-light);
    z-index: 10000;
    overflow-y: auto;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition-medium);
}

.project-detail.active {
    opacity: 1;
    visibility: visible;
}

.project-detail-close {
    position: fixed;
    top: 30px;
    right: 40px;
    width: 45px;
    height: 45px;
    background: var(--bg-dark);
    border: none;
    border-radius: 0;
    color: #F4F4F2;
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition-fast);
    z-index: 10001;
}

.project-detail-close:hover {
    background: #333333;
    transform: scale(1.05);
}

.project-detail-content {
    max-width: 1400px;
    margin: 0 auto;
    padding: 100px 60px 80px;
}

/* Header Section */
.project-detail-header {
    display: grid;
    grid-template-columns: 280px 1fr 320px;
    gap: 50px;
    margin-bottom: 60px;
    align-items: start;
}

.project-detail-meta {
    text-align: right;
    padding-right: 30px;
    border-right: 1px solid #D0D0D0;
}

.project-detail-title {
    font-family: var(--font-display);
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 8px;
    line-height: 1.2;
    letter-spacing: -0.02em;
}

.project-detail-location {
    font-size: 12px;
    font-weight: 400;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 40px;
}

.project-meta-item {
    margin-bottom: 25px;
}

.project-meta-label {
    font-size: 10px;
    font-weight: 400;
    color: var(--text-light);
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 4px;
}

.project-meta-value {
    font-size: 14px;
    font-weight: 700;
    color: var(--text-primary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.project-detail-main-image {
    width: 100%;
}

.project-detail-main-image img {
    width: 100%;
    height: auto;
    display: block;
}

.project-detail-intro {
    padding-left: 30px;
}

.project-detail-description {
    font-size: 15px;
    font-weight: 300;
    line-height: 1.9;
    color: var(--text-primary);
}

/* Gallery Section */
.project-detail-gallery {
    margin-top: 60px;
}

.gallery-row {
    display: grid;
    gap: 20px;
    margin-bottom: 20px;
}

.gallery-row.two-cols {
    grid-template-columns: 1fr 1fr;
}

.gallery-row.three-cols {
    grid-template-columns: 1fr 1fr 1fr;
}

.gallery-row.full {
    grid-template-columns: 1fr;
}

.gallery-row.asymmetric {
    grid-template-columns: 2fr 1fr;
}

.gallery-row.asymmetric-reverse {
    grid-template-columns: 1fr 2fr;
}

.gallery-item {
    overflow: hidden;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.6s ease;
}

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

/* Text Block in Gallery */
.gallery-text-block {
    display: flex;
    align-items: center;
    padding: 40px;
    background: transparent;
}

.gallery-text-block p {
    font-size: 15px;
    font-weight: 300;
    line-height: 1.9;
    color: var(--text-primary);
}

.gallery-quote {
    padding: 60px 80px;
    background: transparent;
    border-left: 2px solid var(--primary-color);
    margin: 40px 0;
}

.gallery-quote p {
    font-family: var(--font-display);
    font-size: 1.4rem;
    font-weight: 300;
    line-height: 1.7;
    color: var(--text-primary);
    font-style: italic;
}

.gallery-quote cite {
    display: block;
    margin-top: 20px;
    font-size: 12px;
    font-style: normal;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.gallery-quote cite strong {
    color: var(--text-primary);
    font-weight: 700;
}

/* Navigation between projects */
.project-detail-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 80px;
    padding-top: 40px;
    border-top: 1px solid #D0D0D0;
}

.project-nav-btn {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 14px 25px;
    background: transparent;
    border: 1px solid #D0D0D0;
    color: var(--text-primary);
    font-size: 12px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 1px;
    cursor: pointer;
    transition: var(--transition-fast);
}

.project-nav-btn:hover {
    background: var(--bg-dark);
    color: #F4F4F2;
    border-color: var(--bg-dark);
}

.project-nav-btn i {
    font-size: 12px;
}

/* Projects Page Responsive */
@media (max-width: 1200px) {
    .project-detail-header {
        grid-template-columns: 220px 1fr 280px;
        gap: 30px;
    }
}

@media (max-width: 1024px) {
    .projects-showcase-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .project-detail-content {
        padding: 100px 40px 60px;
    }

    .project-detail-header {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .project-detail-meta {
        text-align: left;
        padding-right: 0;
        border-right: none;
        border-bottom: 1px solid #D0D0D0;
        padding-bottom: 30px;
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: 20px;
    }

    .project-detail-title,
    .project-detail-location {
        grid-column: 1 / -1;
    }

    .project-detail-location {
        margin-bottom: 20px;
    }

    .project-detail-intro {
        padding-left: 0;
    }

    .gallery-row.asymmetric,
    .gallery-row.asymmetric-reverse {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .projects-showcase-grid {
        grid-template-columns: 1fr;
    }

    .projects-hero {
        height: 35vh;
        min-height: 280px;
    }

    .project-detail-close {
        top: 20px;
        right: 20px;
        width: 40px;
        height: 40px;
    }

    .project-detail-content {
        padding: 80px 20px 40px;
    }

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

    .gallery-row.two-cols,
    .gallery-row.three-cols {
        grid-template-columns: 1fr;
    }

    .gallery-quote {
        padding: 30px 20px;
    }

    .gallery-quote p {
        font-size: 1.1rem;
    }

    .project-detail-nav {
        flex-direction: column;
        gap: 15px;
    }

    .project-nav-btn {
        width: 100%;
        justify-content: center;
    }
}
