/* 
  GUIA 24 - CSS Stylesheet
  Modern, Vanguardist, Responsive
*/

:root {
    --primary-color: #004581;
    /* Corporate Blue */
    --secondary-color: #ffcc00;
    /* Corporate Yellow */
    --accent-color: #2172b3;
    --text-color: #333;
    --bg-color: #f8f9fa;
    --white: #ffffff;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

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

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

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

ul {
    list-style: none;
}

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

/* --- Pre-header --- */
.pre-header {
    background-color: var(--primary-color);
    color: var(--white);
    padding: 8px 0;
    /* Restoring default padding for mobile */
    display: flex;
    align-items: center;
    font-size: 0.85rem;
    z-index: 1001;
    width: 100%;
    transition: transform 0.3s ease;
}

@media (min-width: 992px) {
    .pre-header {
        position: fixed;
        top: 0;
        left: 0;
        height: 46px;
        /* Explicit height only on desktop */
        padding: 0;
        /* No padding on desktop to maintain height */
    }
}

.pre-header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: nowrap;
    width: 100%;
    /* Ensure container takes full width */
    /* Force single line on desktop */
}

.weather-clock-widget {
    display: flex;
    align-items: center;
    gap: 15px;
    background: rgba(255, 255, 255, 0.1);
    padding: 4px 12px;
    border-radius: 20px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.8rem;
    letter-spacing: 0.5px;
}

#weather-icon {
    font-size: 1rem;
    color: var(--secondary-color);
}

#live-time {
    color: var(--white);
    font-weight: 500;
}

.pre-header .contact-info {
    display: flex;
    gap: 30px;
    /* Increased separation between blocks */
}

.pre-header a {
    color: var(--white);
    display: inline-flex;
    align-items: center;
    gap: 8px;
    opacity: 0.9;
    white-space: nowrap;
}

.pre-header a:hover {
    color: var(--secondary-color);
    opacity: 1;
}

/* --- Header & Nav --- */
header {
    background: var(--white);
    width: 100%;
    z-index: 1000;
    transition: var(--transition);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

/* Desktop Header Positioning - LOCKING TO PRE-HEADER */
@media (min-width: 992px) {
    header {
        position: fixed;
        top: 46px;
        /* EXACTLY the height of the pre-header */
        /* Stay below pre-header */
    }

    body.scrolled .pre-header {
        transform: translateY(-100%);
    }

    body.scrolled header {
        top: 0;
        /* Move to top when scrolled */
        background: rgba(255, 255, 255, 0.95);
        backdrop-filter: blur(10px);
        box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
    }
}

/* Mobile Header Positioning */
@media (max-width: 991px) {
    header {
        position: sticky;
        top: 0;
    }
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 0;
    /* Balanced padding for vertical centering */
}

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

.nav-links {
    display: flex;
    gap: 30px;
    align-items: center;
}

.nav-links li a {
    font-weight: 500;
    color: var(--primary-color);
}

.nav-links li a:hover {
    color: var(--accent-color);
}

/* --- Menu Toggle --- */
.menu-toggle {
    display: none;
    font-size: 1.8rem;
    color: var(--primary-color);
    cursor: pointer;
    z-index: 1002;
}

/* --- Language Selector --- */
.lang-selector {
    display: flex;
    gap: 8px;
    margin-left: 20px;
}

.lang-btn {
    cursor: pointer;
    font-size: 0.75rem;
    font-weight: 700;
    opacity: 0.6;
    padding: 2px 6px;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.1);
    color: var(--white);
}

.lang-btn.active,
.lang-btn:hover {
    opacity: 1;
    background: var(--secondary-color);
    color: var(--primary-color);
}

/* --- Sections --- */
section {
    padding: 100px 0;
}

.section-title {
    text-align: center;
    margin-bottom: 60px;
}

.section-title h2 {
    font-size: 2.5rem;
    position: relative;
    display: inline-block;
    padding-bottom: 15px;
}

.section-title h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 4px;
    background-color: var(--secondary-color);
    border-radius: 2px;
}

/* --- Hero Section --- */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    background: linear-gradient(rgba(0, 69, 129, 0.6), rgba(0, 69, 129, 0.4)), url('hero-bg.jpg');
    background-size: cover;
    background-position: center;
    color: var(--white);
    padding-top: 100px;
}

@media (min-width: 992px) {
    .hero {
        padding-top: 140px;
    }
}

.hero-content h1 {
    font-size: 3.5rem;
    margin-bottom: 20px;
    color: var(--white);
    text-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}

@media (max-width: 768px) {
    .hero-content h1 {
        font-size: 2.2rem;
    }
}

.hero-content p {
    font-size: 1.2rem;
    margin-bottom: 35px;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

/* --- Service Grid --- */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
}

@media (min-width: 1200px) {
    .services-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

.service-card {
    background: var(--white);
    padding: 40px;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    text-align: center;
    transition: var(--transition);
    border: 1px solid rgba(0, 0, 0, 0.03);
}

.service-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 50px rgba(0, 69, 129, 0.1);
}

.service-card i {
    font-size: 3rem;
    color: var(--secondary-color);
    margin-bottom: 25px;
    display: block;
}

/* --- Footer --- */
.footer {
    background: var(--primary-color);
    color: var(--white);
    padding: 80px 0 30px;
    text-align: center;
}

.footer-logo {
    background: white;
    display: inline-block;
    padding: 12px 25px;
    border-radius: 10px;
    margin-bottom: 30px;
}

.footer-logo img {
    height: 50px;
    display: block;
}

.footer-links {
    margin: 20px 0;
}

.footer-links a {
    color: var(--white);
    margin: 0 15px;
    opacity: 0.8;
    font-size: 0.9rem;
}

.footer-links a:hover {
    opacity: 1;
    color: var(--secondary-color);
}

/* --- Responsive Navigation Drawer --- */
@media (max-width: 991px) {
    .menu-toggle {
        display: block;
    }

    .nav-links {
        position: fixed;
        right: -100%;
        top: 0;
        width: 280px;
        height: 100vh;
        background: var(--primary-color);
        flex-direction: column;
        padding: 120px 40px;
        box-shadow: -10px 0 30px rgba(0, 0, 0, 0.2);
        transition: 0.5s cubic-bezier(0.77, 0.2, 0.05, 1.0);
        z-index: 1001;
    }

    .nav-links li a {
        font-size: 1.4rem;
        color: var(--white);
        font-weight: 600;
        display: block;
        padding: 10px 0;
    }

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

    header .nav-links li a:hover {
        color: var(--secondary-color);
    }

    /* Mobile specific header layout adjustments */
    header nav {
        gap: 10px;
    }

    header .logo img {
        height: 40px;
    }

    header .cta-button {
        padding: 8px 16px;
        font-size: 0.85rem;
        white-space: nowrap;
    }
}

@media (max-width: 380px) {
    header .logo img {
        height: 35px;
    }

    header .cta-button {
        padding: 6px 12px;
        font-size: 0.75rem;
    }
}

/* --- Utility Classes --- */
.cta-button {
    background-color: var(--secondary-color);
    color: var(--primary-color);
    padding: 12px 28px;
    border-radius: 8px;
    font-weight: 700;
    box-shadow: 0 4px 15px rgba(255, 204, 0, 0.3);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: none;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.cta-button::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -60%;
    width: 20%;
    height: 200%;
    background: rgba(255, 255, 255, 0.4);
    transform: rotate(30deg);
    transition: none;
    animation: shine 4s infinite;
}

@keyframes shine {
    0% {
        left: -60%;
    }

    15% {
        left: 120%;
    }

    100% {
        left: 120%;
    }
}

.cta-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(255, 204, 0, 0.4);
}

.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: transform 0.8s ease-out, opacity 0.8s ease-out;
}

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

/* --- WhatsApp --- */
.whatsapp-wrapper {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 1002;
}

.whatsapp-float {
    background-color: #25d366;
    color: white;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 30px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    animation: whatsapp-pulse 2s infinite;
}

@keyframes whatsapp-pulse {
    0% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.5);
    }

    70% {
        transform: scale(1.05);
        box-shadow: 0 0 0 15px rgba(37, 211, 102, 0);
    }

    100% {
        transform: scale(1);
    }
}

.whatsapp-msg {
    position: absolute;
    bottom: 80px;
    right: 0;
    background: white;
    padding: 15px 20px;
    border-radius: 15px;
    box-shadow: 0 5px 25px rgba(0, 0, 0, 0.15);
    width: 250px;
    font-size: 0.9rem;
    margin-bottom: 10px;
    display: none;
    /* Hidden by default */
    color: var(--text-color);
}

.whatsapp-wrapper:hover .whatsapp-msg {
    display: block;
    animation: fadeIn 0.4s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

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

/* --- Modals --- */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
}

.modal-content {
    background: var(--white);
    margin: 5% auto;
    padding: 50px;
    width: 90%;
    max-width: 800px;
    border-radius: 20px;
    position: relative;
    max-height: 85vh;
    overflow-y: auto;
}

.close-modal {
    position: absolute;
    right: 25px;
    top: 20px;
    font-size: 30px;
    cursor: pointer;
    color: var(--primary-color);
}

@media (max-width: 600px) {
    .pre-header .container {
        flex-direction: column;
        gap: 8px;
    }

    .hero-content h1 {
        font-size: 2rem;
    }
}