/* assets/css/common.css - Shared styles across all pages */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box
}

:root {
    --rouge-primary: #DC2626;
    --rouge-light: #EF4444;
    --rouge-dark: #991B1B;
    --noir: #0A0A0A;
    --noir-light: #171717;
    --blanc: #FFFFFF;
    --gris-light: #F5F5F5;
    --gris: #737373;
    --gris-dark: #525252;
    --whatsapp: #25D366;
}

html {
    scroll-behavior: smooth
}

html,
body {
    height: 100%
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--blanc);
    color: var(--noir);
    line-height: 1.6;
    overflow-x: hidden
}

:focus-visible {
    outline: 3px solid var(--rouge-primary);
    outline-offset: 2px
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0
}

/* Navigation */
nav {
    position: fixed;
    top: 0;
    width: 100%;
    padding: 1rem 5%;
    background: rgba(255, 255, 255, .95);
    backdrop-filter: blur(20px);
    z-index: 1000;
    transition: all .3s ease;
    box-shadow: 0 2px 10px rgba(0, 0, 0, .05)
}

nav.scrolled {
    padding: .7rem 5%;
    background: rgba(255, 255, 255, .98);
    box-shadow: 0 4px 30px rgba(220, 38, 38, .1)
}

.nav-container {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem
}

.logo {
    display: flex;
    align-items: center;
    text-decoration: none;
    transition: transform .3s ease;
    height: 50px
}

.logo:hover {
    transform: scale(1.05)
}

.logo img {
    height: 100%;
    width: auto;
    max-width: 200px;
    object-fit: contain;
    display: block
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 2.5rem;
    align-items: center
}

.nav-links a {
    color: var(--noir);
    text-decoration: none;
    font-weight: 600;
    position: relative;
    transition: color .3s
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--rouge-primary);
    transition: width .3s
}

.nav-links a:hover {
    color: var(--rouge-primary)
}

.nav-links a:hover::after,
.nav-links a.active::after {
    width: 100%
}

.nav-links a.active {
    color: var(--rouge-primary)
}

.menu-toggle {
    display: none;
    flex-direction: column;
    cursor: pointer;
    gap: 4px;
    background: transparent;
    border: 0;
    padding: .5rem
}

.menu-toggle span {
    width: 26px;
    height: 2px;
    background: var(--noir);
    transition: all .3s;
    display: block
}

.lang-switch {
    display: flex;
    gap: .5rem;
    align-items: center;
    margin-left: 1rem
}

.lang-switch a {
    font-weight: 800;
    text-decoration: none;
    border: 2px solid var(--gris-light);
    padding: .35rem .6rem;
    border-radius: 10px;
    color: var(--noir);
    font-size: .8rem
}

.lang-switch a.active {
    border-color: var(--rouge-primary);
    color: var(--rouge-primary)
}

/* Footer */
footer {
    background: var(--noir);
    color: var(--blanc);
    position: relative;
    overflow: hidden
}

footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, transparent, var(--rouge-primary), transparent)
}

.footer-main {
    padding: 4rem 5% 2rem;
    border-bottom: 1px solid rgba(255, 255, 255, .1)
}

.footer-grid {
    max-width: 1400px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 3rem
}

.footer-section h3 {
    color: var(--rouge-primary);
    font-size: 1.3rem;
    margin-bottom: 1.5rem;
    font-weight: 700
}

.footer-section p,
.footer-section li {
    color: var(--gris);
    line-height: 1.8;
    margin-bottom: .5rem
}

.footer-section ul {
    list-style: none
}

.footer-section a {
    color: var(--gris);
    text-decoration: none;
    transition: all .3s;
}

.footer-section a:hover {
    color: var(--blanc);
    transform: translateX(5px)
}

.footer-logo {
    font-size: 2rem;
    font-weight: 900;
    background: linear-gradient(135deg, var(--rouge-primary), var(--rouge-light));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 1rem;
    display: inline-block
}

.contact-info {
    display: flex;
    flex-direction: column;
    gap: 1rem
}

.contact-item {
    display: flex;
    align-items: center;
    gap: .8rem
}

.contact-icon {
    width: 40px;
    height: 40px;
    background: rgba(220, 38, 38, .1);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--rouge-primary);
    font-size: 1.2rem
}

.contact-icon i {
    font-size: inherit;
    color: inherit
}

.social-links {
    display: flex;
    gap: 1rem;
    margin-top: 1rem
}

.social-link {
    width: 50px;
    height: 50px;
    border-radius: 12px;
    background: rgba(255, 255, 255, .08);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--blanc);
    text-decoration: none;
    font-size: 1.3rem;
    transition: all .3s ease;
    border: 2px solid rgba(255, 255, 255, .15)
}

.social-link i {
    font-size: inherit;
    color: inherit;
    transition: transform .3s;
    line-height: 1;
    display: inline-block;
    vertical-align: middle
}

.social-link:hover {
    background: var(--rouge-primary);
    border-color: var(--rouge-primary);
    transform: translateY(-5px) scale(1.05);
    box-shadow: 0 8px 20px rgba(220, 38, 38, .4)
}

.social-link:hover i {
    transform: scale(1.1) rotate(5deg)
}

.footer-bottom {
    padding: 2rem 5%;
    text-align: center
}

.footer-bottom p {
    color: var(--gris);
    font-size: .9rem
}

/* Scroll animations */
.scroll-animate {
    opacity: 0;
    transform: translateY(30px);
    transition: all .8s ease
}

.scroll-animate.visible {
    opacity: 1;
    transform: translateY(0)
}

/* Responsive */
@media (max-width:768px) {
    .nav-links {
        position: fixed;
        top: 64px;
        left: 0;
        right: 0;
        background: var(--blanc);
        flex-direction: column;
        padding: 1rem 1.25rem 1.25rem;
        box-shadow: 0 4px 20px rgba(0, 0, 0, .1);
        transform: translateY(-120%);
        opacity: 0;
        pointer-events: none;
        transition: transform .3s ease, opacity .3s ease;
        gap: .75rem;
        z-index: 999
    }

    .nav-links.active {
        transform: translateY(0);
        opacity: 1;
        pointer-events: auto
    }

    .nav-links a {
        padding: .75rem 1rem;
        border-radius: .75rem
    }

    .nav-links a:active {
        background: var(--gris-light)
    }

    .menu-toggle {
        display: flex;
        justify-content: center;
    }

    .menu-toggle.active span:nth-child(1) {
        transform: rotate(45deg) translate(5px, 5px)
    }

    .menu-toggle.active span:nth-child(2) {
        opacity: 0
    }

    .menu-toggle.active span:nth-child(3) {
        transform: rotate(-45deg) translate(7px, -6px)
    }

    .lang-switch {
        margin: 1rem 0 0
    }

    .footer-grid {
        grid-template-columns: 1fr;
        gap: 2rem
    }

    .footer-section {
        text-align: center
    }

    .footer-section ul {
        display: flex;
        flex-direction: column;
        align-items: center
    }

    .social-links {
        justify-content: center
    }

    .contact-info {
        align-items: center
    }

    .contact-item {
        flex-direction: column;
        text-align: center;
        align-items: center
    }

    body.menu-open {
        overflow: hidden
    }
}

@media (prefers-reduced-motion:reduce) {
    * {
        animation: none !important;
        transition: none !important
    }
}

/* Gallery - 3 Column Layout */
.gallery-grid {
    max-width: 1400px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}

.gallery-item {
    position: relative;
    border-radius: 20px;
    overflow: hidden;
    background: rgba(255, 255, 255, .05);
    border: 2px solid rgba(255, 255, 255, .1);
    aspect-ratio: 4/3;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all .3s ease;
}

.gallery-item:hover {
    transform: translateY(-5px);
    border-color: var(--rouge-primary);
    box-shadow: 0 8px 25px rgba(220, 38, 38, .3);
}

.gallery-item img,
.gallery-item video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform .3s ease;
}

.gallery-item:hover img,
.gallery-item:hover video {
    transform: scale(1.05);
}

/* Responsive - Gallery */
@media (max-width: 1024px) {
    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .gallery-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .gallery-grid {
        gap: 1rem;
    }
}

/* Additional Mobile Responsive Improvements */
@media (max-width: 768px) {

    /* Navigation improvements */
    nav {
        padding: 0.75rem 4%;
    }

    nav.scrolled {
        padding: 0.6rem 4%;
    }

    .logo {
        height: 45px;
    }

    /* Footer improvements */
    .footer-main {
        padding: 3rem 4% 1.5rem;
    }

    .footer-section h3 {
        font-size: 1.1rem;
        margin-bottom: 1rem;
    }

    .footer-logo {
        font-size: 1.5rem;
    }

    .contact-item {
        flex-direction: column;
        align-items: center;
        gap: 0.5rem;
        text-align: center;
    }

    .contact-icon {
        width: 35px;
        height: 35px;
        font-size: 1rem;
    }

    .social-links {
        gap: 0.75rem;
    }

    .social-link {
        width: 45px;
        height: 45px;
        font-size: 1.1rem;
    }

    .footer-bottom {
        padding: 1.5rem 4%;
    }

    .footer-bottom p {
        font-size: 0.85rem;
    }
}

@media (max-width: 480px) {

    /* Extra small devices */
    nav {
        padding: 0.6rem 3%;
    }

    nav.scrolled {
        padding: 0.5rem 3%;
    }

    .logo {
        height: 40px;
    }

    .logo img {
        max-width: 150px;
    }

    .footer-main {
        padding: 2.5rem 3% 1.5rem;
    }

    .footer-grid {
        gap: 1.5rem;
    }

    .social-link {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }
}

/* General mobile improvements for common elements */
@media (max-width: 768px) {

    /* Ensure buttons are touch-friendly */
    .btn,
    button {
        min-height: 44px;
        min-width: 44px;
    }

    /* Prevent text overflow */
    h1,
    h2,
    h3,
    h4,
    h5,
    h6 {
        word-wrap: break-word;
        overflow-wrap: break-word;
    }

    /* Improve spacing for mobile */
    section {
        padding-left: 4%;
        padding-right: 4%;
    }
}

@media (max-width: 480px) {
    section {
        padding-left: 3%;
        padding-right: 3%;
    }
}