/* Design Tokens & Theme Variables */
:root {
    --primary-color: #0b2545;       /* Deep Navy Blue for Trust */
    --primary-light: #134074;
    --accent-color: #fe8700;        /* Vivid Orange for energy & "tomorrow" */
    --accent-hover: #e07600;
    --success-color: #10b981;       /* Emerald for Health & Safety */
    --text-color: #1e293b;          /* Dark Slate for readability */
    --text-muted: #64748b;          /* Cool Grey for supporting text */
    --bg-light: #f8fafc;            /* Soft slate background */
    --bg-white: #ffffff;
    --border-color: #e2e8f0;
    --radius-sm: 8px;
    --radius-md: 16px;
    --radius-lg: 24px;
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 20px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 10px 30px rgba(0, 0, 0, 0.12);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Reset and Global Styles */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Nunito', sans-serif;
    color: var(--text-color);
    background-color: var(--bg-white);
    line-height: 1.6;
    overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Outfit', sans-serif;
    color: var(--primary-color);
    font-weight: 700;
}

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

/* Header & Glassmorphism Navigation */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 80px;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.4);
    z-index: 1000;
    display: flex;
    align-items: center;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

.header.scrolled {
    height: 70px;
    background: var(--bg-white);
    box-shadow: var(--shadow-md);
}

.nav-container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

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

.header.scrolled .logo img {
    height: 40px;
}

.nav-menu {
    display: flex;
    gap: 30px;
    list-style: none;
}

.nav-item {
    position: relative;
}

.nav-link {
    font-size: 16px;
    font-weight: 600;
    color: var(--primary-color);
    padding: 10px 0;
    display: flex;
    align-items: center;
    gap: 6px;
}

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

/* Dropdown menu */
.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background: var(--bg-white);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    padding: 10px;
    min-width: 240px;
    visibility: hidden;
    opacity: 0;
    pointer-events: none;
    transform: translateY(10px);
    transition: var(--transition);
    list-style: none;
}

.nav-item:hover .dropdown-menu {
    visibility: visible;
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
}

.dropdown-link {
    display: block;
    padding: 10px 15px;
    border-radius: var(--radius-sm);
    font-weight: 500;
    transition: var(--transition);
}

.dropdown-link:hover {
    background: var(--bg-light);
    color: var(--accent-color);
}

/* Mobile Navigation */
.mobile-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 24px;
    color: var(--primary-color);
    cursor: pointer;
}

/* Hero Section */
.hero {
    position: relative;
    height: 85vh;
    min-height: 550px;
    background: linear-gradient(rgba(11, 37, 69, 0.4), rgba(11, 37, 69, 0.8)), url('/assets/miconsulta_slider.jpg') center/cover no-repeat;
    display: flex;
    align-items: center;
    color: var(--bg-white);
    padding-top: 80px;
    overflow: hidden;
}

.hero::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    right: 0;
    height: 80px;
    background: linear-gradient(to top, var(--bg-white), transparent);
    z-index: 2;
}

.hero-content {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    z-index: 5;
    position: relative;
}

/* Hero entrance animations */
@keyframes heroFadeInLeft {
    from {
        opacity: 0;
        transform: translateX(-45px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes heroFadeInUp {
    from {
        opacity: 0;
        transform: translateY(35px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero-logo-animate {
    opacity: 0;
    animation: heroFadeInLeft 0.8s cubic-bezier(0.165, 0.84, 0.44, 1) forwards;
    animation-delay: 0.15s;
}

.hero-title-animate {
    opacity: 0;
    animation: heroFadeInLeft 0.8s cubic-bezier(0.165, 0.84, 0.44, 1) forwards;
    animation-delay: 0.3s;
}

.hero-text-animate {
    opacity: 0;
    animation: heroFadeInLeft 0.8s cubic-bezier(0.165, 0.84, 0.44, 1) forwards;
    animation-delay: 0.45s;
}

.hero-btn-animate {
    opacity: 0;
    animation: heroFadeInUp 0.8s cubic-bezier(0.165, 0.84, 0.44, 1) forwards;
    animation-delay: 0.6s;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(254, 135, 0, 0.15);
    border: 1px solid rgba(254, 135, 0, 0.3);
    color: #ff9d24;
    padding: 6px 16px;
    border-radius: 99px;
    font-weight: 600;
    margin-bottom: 24px;
    font-size: 14px;
}

.hero h1 {
    font-size: 3.5rem;
    line-height: 1.2;
    color: var(--bg-white);
    margin-bottom: 20px;
    max-width: 650px;
}

.hero p {
    font-size: 1.25rem;
    color: rgba(255, 255, 255, 0.85);
    max-width: 550px;
    margin-bottom: 35px;
    font-weight: 300;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 16px 36px;
    border-radius: 99px;
    font-weight: 700;
    font-size: 16px;
    transition: var(--transition);
    cursor: pointer;
    border: none;
}

.btn-primary {
    background: linear-gradient(135deg, var(--accent-color) 0%, #e05300 100%);
    color: var(--bg-white);
    box-shadow: 0 4px 15px rgba(254, 135, 0, 0.4);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(254, 135, 0, 0.5);
}

/* Sections */
.section {
    padding: 80px 0;
}

.section-alt {
    background-color: var(--bg-light);
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.mejora-container {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 50px;
    align-items: center;
}

.section-header {
    text-align: center;
    max-width: 700px;
    margin: 0 auto 50px auto;
}

.section-header h2 {
    font-size: 2.5rem;
    margin-bottom: 20px;
}

.section-header p {
    color: var(--text-muted);
    font-size: 1.1rem;
}

/* Grid layout for gallery cards */
.grid-cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    margin-top: 40px;
}

/* Card animation on load */
@keyframes cardFadeIn {
    from {
        opacity: 0;
        transform: translateY(40px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.card-item {
    display: block;
    text-decoration: none;
    position: relative;
    opacity: 0;
    animation: cardFadeIn 0.8s cubic-bezier(0.165, 0.84, 0.44, 1) forwards;
    transition: transform 0.4s cubic-bezier(0.165, 0.84, 0.44, 1), filter 0.4s ease;
}

.card-item:nth-child(1) { animation-delay: 0.1s; }
.card-item:nth-child(2) { animation-delay: 0.2s; }
.card-item:nth-child(3) { animation-delay: 0.3s; }
.card-item:nth-child(4) { animation-delay: 0.4s; }
.card-item:nth-child(5) { animation-delay: 0.5s; }
.card-item:nth-child(6) { animation-delay: 0.6s; }

.card-item:hover {
    transform: translateY(-12px) scale(1.025);
    filter: drop-shadow(0 15px 30px rgba(254, 135, 0, 0.35));
}

.card-shine-wrapper {
    position: relative;
    border-radius: 24px; /* Matches the vertical PNG card corners */
    overflow: hidden;
    width: 100%;
    height: 100%;
}

.card-img {
    width: 100%;
    height: auto;
    display: block;
    aspect-ratio: 2 / 3;
    object-fit: cover;
    transition: transform 0.5s ease;
}

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

.card-shine {
    position: absolute;
    top: 0;
    left: -150%;
    width: 60%;
    height: 100%;
    background: linear-gradient(
        to right,
        rgba(255, 255, 255, 0) 0%,
        rgba(255, 255, 255, 0.35) 50%,
        rgba(255, 255, 255, 0) 100%
    );
    transform: skewX(-25deg);
    transition: left 0.8s ease;
}

.card-item:hover .card-shine {
    left: 150%;
}

/* Map Section */
.map-container {
    width: 100%;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-color);
}

.map-container iframe {
    display: block;
}

/* Form Styles */
.arrep-form-container {
    max-width: 800px;
    margin: 0 auto;
    background: var(--bg-white);
    padding: 40px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-color);
}

.form-group-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

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

.form-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    font-size: 15px;
}

.form-control {
    width: 100%;
    padding: 14px 18px;
    border: 1px solid #cbd5e1;
    border-radius: var(--radius-sm);
    font-family: inherit;
    font-size: 15px;
    outline: none;
    transition: var(--transition);
}

.form-control:focus {
    border-color: var(--accent-color);
    box-shadow: 0 0 0 3px rgba(254, 135, 0, 0.15);
}

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

.checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 14px;
    color: var(--text-muted);
    cursor: pointer;
}

.checkbox-label input {
    margin-top: 4px;
}

/* Footer Styles */
.footer {
    background-color: #0f172a; /* Deep dark background */
    color: #94a3b8;
    padding: 80px 0 30px 0;
    border-top: 4px solid var(--accent-color);
}

.footer h4, .footer h5 {
    color: var(--bg-white);
    margin-bottom: 20px;
}

.footer-top {
    display: grid;
    grid-template-columns: 2fr 1fr 1.5fr;
    gap: 40px;
    margin-bottom: 60px;
}

.footer-brand img {
    max-width: 250px;
    height: auto;
    margin-bottom: 20px;
}

.footer-contact-info p {
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.footer-links-list {
    list-style: none;
}

.footer-links-list li {
    margin-bottom: 12px;
}

.footer-links-list a:hover {
    color: var(--bg-white);
}

.footer-legal-box {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    padding: 24px;
    border-radius: var(--radius-md);
}

.footer-ssn-logos {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 30px;
    margin: 40px 0;
    padding: 24px;
    background: var(--bg-white);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
}

.ssn-logo-img {
    height: 45px;
    transition: var(--transition);
}

.ssn-logo-img:hover {
    opacity: 1;
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 20px;
    font-size: 14px;
}

/* Responsiveness */
@media (max-width: 1024px) {
    .grid-cards {
        grid-template-columns: repeat(2, 1fr);
    }
    .footer-top {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 768px) {
    .header {
        height: 70px;
    }
    
    .mejora-container {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    .nav-menu {
        position: fixed;
        top: 70px;
        left: -100%;
        width: 100%;
        height: calc(100vh - 70px);
        background: var(--bg-white);
        flex-direction: column;
        padding: 24px;
        gap: 0;
        box-shadow: var(--shadow-lg);
        transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
        overflow-y: auto;
    }
    
    .nav-menu.active {
        left: 0;
    }
    
    #navNav {
        position: absolute;
    }
    
    .mobile-toggle {
        display: block;
        padding: 8px;
        border-radius: var(--radius-sm);
        transition: var(--transition);
    }
    
    .mobile-toggle:hover {
        background: rgba(11, 37, 69, 0.05);
    }
    
    .nav-item {
        width: 100%;
        border-bottom: 1px solid var(--border-color);
    }
    
    .nav-link {
        font-size: 1.1rem;
        font-weight: 700;
        padding: 16px 0;
        color: var(--primary-color);
        display: flex;
        justify-content: space-between;
        align-items: center;
        width: 100%;
    }
    
    .nav-link svg {
        transition: transform 0.3s ease;
    }
    
    .nav-item.open .nav-link svg {
        transform: rotate(180deg);
    }
    
    .dropdown-menu {
        position: static;
        box-shadow: none;
        border: none;
        padding: 0 0 16px 16px;
        visibility: visible;
        opacity: 1;
        pointer-events: auto;
        transform: none;
        background: transparent;
        display: none;
        width: 100%;
    }
    
    .nav-item.open .dropdown-menu {
        display: block;
    }
    
    .dropdown-link {
        display: block;
        padding: 10px 0;
        font-size: 0.98rem;
        color: var(--text-muted);
        font-weight: 600;
        border-radius: 0;
    }
    
    .dropdown-link:hover {
        background: transparent;
        color: var(--accent-color);
        padding-left: 4px;
    }
    
    .hero h1 {
        font-size: 2.5rem;
    }
    
    .grid-cards {
        grid-template-columns: 1fr;
    }
    
    .form-group-row {
        grid-template-columns: 1fr;
    }
    
    .footer-top {
        grid-template-columns: 1fr;
    }
    
    .footer-bottom {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
}

/* Floating WhatsApp Button */
.whatsapp-float {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 60px;
    height: 60px;
    background-color: #25d366;
    color: white;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 9999;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.whatsapp-float:hover {
    background-color: #20ba5a;
    transform: scale(1.1) translateY(-3px);
    box-shadow: 0 6px 16px rgba(37, 211, 102, 0.3);
}

.whatsapp-float::before {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background-color: #25d366;
    opacity: 0.5;
    z-index: -1;
    animation: whatsapp-pulse 2s infinite;
}

@keyframes whatsapp-pulse {
    0% {
        transform: scale(1);
        opacity: 0.5;
    }
    100% {
        transform: scale(1.4);
        opacity: 0;
    }
}

@media (max-width: 480px) {
    .whatsapp-float {
        bottom: 20px;
        right: 20px;
        width: 50px;
        height: 50px;
    }
    .whatsapp-float svg {
        width: 26px;
        height: 26px;
    }
}
