:root {
    --primary-color: #003366;
    --primary-light: #004d99;
    --primary-dark: #001f3f;
    --accent-color: #00b4d8;
    --accent-hover: #0096c7;
    --text-color: #333333;
    --text-light: #666666;
    --white: #ffffff;
    --off-white: #f8f9fa;
    --bg-gradient: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    --shadow-sm: 0 4px 6px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 10px 15px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 20px 25px rgba(0, 0, 0, 0.15);
    --radius-md: 12px;
    --radius-lg: 20px;
    --transition: all 0.3s ease;
    --font-heading: 'Montserrat', sans-serif;
    --font-body: 'Roboto', sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    color: var(--text-color);
    line-height: 1.6;
    background-color: var(--off-white);
    overflow-x: hidden;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-heading);
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1rem;
    color: var(--primary-dark);
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.container-medium {
    max-width: 1000px;
}

/* --- Components --- */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.8rem 1.8rem;
    font-weight: 600;
    font-size: 1rem;
    border-radius: 50px;
    transition: var(--transition);
    cursor: pointer;
    box-shadow: var(--shadow-sm);
    gap: 0.5rem;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-primary {
    background: var(--primary-color);
    color: var(--white);
    border: 2px solid var(--primary-color);
}

.btn-primary:hover {
    background: var(--primary-light);
    border-color: var(--primary-light);
}

.btn-outline {
    background: transparent;
    color: var(--white);
    border: 2px solid var(--white);
}

.btn-outline:hover {
    background: var(--white);
    color: var(--primary-color);
}

.btn-black {
    background: #222;
    color: var(--white);
}

.btn-black:hover {
    background: #000;
}

.btn-whatsapp {
    background: #25D366;
    color: white;
}

.btn-whatsapp:hover {
    background: #20ba5a;
}

.section-heading {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 3rem;
    position: relative;
    padding-bottom: 1rem;
}

.section-heading::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: var(--accent-color);
    border-radius: 2px;
}

/* --- Header --- */
.site-header {
    width: 100%;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    position: fixed;
    top: 0;
    left: 0;
    z-index: 1000;
    box-shadow: var(--shadow-sm);
    padding: 1rem 0;
}

.header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.custom-logo {
    max-height: 50px;
    width: auto;
}

.main-navigation ul {
    display: flex;
    gap: 2rem;
}

.main-navigation a {
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--primary-color);
    position: relative;
    padding: 0.5rem 0;
}

.main-navigation a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--accent-color);
    transition: var(--transition);
}

.main-navigation a:hover::after {
    width: 100%;
}

.mobile-controls-wrapper {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--primary-color);
    cursor: pointer;
}

/* --- Hero Section --- */
.section-hero {
    position: relative;
    padding: 180px 0 100px;
    background: linear-gradient(rgba(0, 51, 102, 0.8), rgba(0, 31, 63, 0.9)), url('../assets/images/service-mediciones.jpg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    color: var(--white);
    overflow: hidden;
}

/* Decorative circles */
.section-hero::before {
    content: '';
    position: absolute;
    top: -100px;
    right: -100px;
    width: 400px;
    height: 400px;
    background: rgba(0, 180, 216, 0.2);
    border-radius: 50%;
    filter: blur(80px);
}

.hero-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.hero-subtitle {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--accent-color);
    letter-spacing: 2px;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
}

.hero-title {
    font-size: 3.5rem;
    margin-bottom: 2rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
    color: var(--white);
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.hero-form-col {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 2.5rem;
    border-radius: var(--radius-lg);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

.form-title {
    color: var(--white);
    text-align: center;
    font-size: 1.8rem;
    margin-bottom: 1.5rem;
}

.hero-contact-form input,
.hero-contact-form textarea,
.input-light {
    width: 100%;
    padding: 1rem;
    margin-bottom: 1rem;
    border: 1px solid rgba(255, 255, 255, 0.3);
    background: rgba(255, 255, 255, 0.9);
    border-radius: 8px;
    font-family: var(--font-body);
    font-size: 1rem;
    transition: var(--transition);
}

.hero-contact-form input:focus,
.hero-contact-form textarea:focus {
    outline: none;
    background: var(--white);
    box-shadow: 0 0 0 3px rgba(0, 180, 216, 0.3);
}

.checkbox-wrapper {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.9);
}

.checkbox-wrapper a {
    color: var(--accent-color);
    text-decoration: underline;
}

.btn-submit-blue,
.btn-blue-solid {
    width: 100%;
    background: var(--accent-color);
    color: var(--white);
    border: none;
    padding: 1rem;
    border-radius: 8px;
    font-weight: 700;
    font-size: 1.1rem;
    cursor: pointer;
    transition: var(--transition);
    text-transform: uppercase;
}

.btn-submit-blue:hover,
.btn-blue-solid:hover {
    background: var(--accent-hover);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 180, 216, 0.4);
}

/* --- Values Strip --- */
.section-values {
    background: var(--primary-color);
    padding: 3rem 0;
    color: var(--white);
    margin-top: -3rem;
    position: relative;
    z-index: 10;
}

.values-flex {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-around;
    gap: 2rem;
    text-align: center;
}

.value-item {
    font-size: 1.1rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

.value-item i {
    font-size: 1.5rem;
    color: var(--accent-color);
}

/* --- About Section --- */
.section-about {
    padding: 6rem 0;
    background: var(--white);
}

.text-content p {
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
    color: var(--text-light);
}

.contact-highlight {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-top: 2rem;
}

.contact-highlight a {
    color: var(--accent-color);
}

/* --- Services Section --- */
.section-services {
    padding: 6rem 0;
    background-color: #f0f2f5;
}

.service-card-horizontal {
    display: flex;
    background: var(--white);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: var(--transition);
    align-items: center;
}

.service-card-horizontal:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-5px);
}

.card-image {
    flex: 1;
    height: 100%;
    min-height: 400px;
}

.card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.service-card-horizontal:hover .card-image img {
    transform: scale(1.05);
}

.card-content {
    flex: 1;
    padding: 3rem;
    text-align: left;
}

.card-content h3 {
    font-size: 2rem;
    margin-bottom: 1.5rem;
    color: var(--primary-color);
}

.card-content p {
    margin-bottom: 2rem;
    font-size: 1.1rem;
    color: var(--text-light);
}

.read-more {
    display: inline-block;
    color: var(--accent-color);
    font-weight: 700;
    letter-spacing: 1px;
    border-bottom: 2px solid transparent;
}

.read-more:hover {
    border-bottom-color: var(--accent-color);
    padding-bottom: 3px;
}

/* --- SEO Content --- */
.dark-bar-header {
    background: var(--primary-dark);
    color: var(--white);
    padding: 2rem 0;
    text-align: center;
}

.section-seo-text {
    padding: 5rem 0;
    background: var(--white);
    line-height: 1.8;
}

.section-seo-text p {
    margin-bottom: 1.5rem;
    color: var(--text-color);
    font-size: 1.05rem;
}

.locations-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
    margin: 2rem 0;
}

.locations-list li {
    background: #f8f9fa;
    padding: 0.8rem 1.2rem;
    border-radius: 8px;
    border-left: 4px solid var(--accent-color);
    font-weight: 500;
}

.centered-buttons {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    margin: 3rem 0;
}

/* --- Call Action --- */
.section-call-action-grey {
    background: url('../assets/images/service-mediciones.jpg') center/cover no-repeat fixed;
    position: relative;
    padding: 6rem 0;
    color: white;
}

.section-call-action-grey::before {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
}

.section-call-action-grey .container {
    position: relative;
    z-index: 1;
}

.call-action-title {
    color: var(--white);
    font-size: 2.5rem;
    margin-bottom: 2rem;
}

.inline-call-form {
    max-width: 800px;
    margin: 0 auto;
}

.form-inputs {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.form-inputs input {
    flex: 1;
    margin-bottom: 0;
    min-width: 0;
    /* Prevent potential overflow issues */
}

.form-inputs button {
    flex: 1;
    width: auto;
    margin-bottom: 0;
    white-space: nowrap;
}

.form-checkbox {
    margin-top: 1rem;
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.8);
    text-align: center !important;
}

.checkbox-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 1rem;
    color: var(--white);
    font-size: 0.9rem;
}

.checkbox-wrapper input[type="checkbox"] {
    width: auto;
    margin: 0;
    cursor: pointer;
}

.checkbox-wrapper label {
    cursor: pointer;
}

.checkbox-wrapper a,
.form-checkbox a {
    color: var(--accent-color);
    text-decoration: underline;
}

/* --- FAQ --- */
.section-faq-list {
    padding: 6rem 0;
    background: var(--off-white);
}

.faq-item {
    background: var(--white);
    padding: 2rem;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    margin-bottom: 2rem;
    border-left: 5px solid var(--primary-color);
}

.faq-title {
    display: flex;
    align-items: center;
    gap: 1rem;
    font-size: 1.3rem;
    margin-bottom: 1rem;
}

.faq-title i {
    color: var(--accent-color);
    background: rgba(0, 180, 216, 0.1);
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
}

/* --- Gallery --- */
.section-gallery {
    padding: 6rem 0;
    background: var(--white);
}

.gallery-grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}

.gallery-grid-3 img {
    width: 100%;
    height: 300px;
    object-fit: cover;
    border-radius: var(--radius-md);
    transition: var(--transition);
    cursor: pointer;
}

.gallery-grid-3 img:hover {
    transform: scale(1.03);
    box-shadow: var(--shadow-lg);
}

/* --- Footer --- */
.site-footer-split {
    background: var(--primary-dark);
    color: var(--white);
}

.footer-split-wrapper {
    display: flex;
}

.footer-col-left,
.footer-col-right {
    flex: 1;
}

.footer-col-left {
    background: url('../assets/images/gallery-1.jpg') center/cover;
    position: relative;
    min-height: 400px;
}

.footer-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 51, 102, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 3rem;
}

.footer-content-box {
    display: flex;
    gap: 2rem;
    max-width: 500px;
}

.blue-line-vertical {
    width: 4px;
    background: var(--accent-color);
}

.btn-footer-msg {
    display: inline-block;
    margin-top: 1.5rem;
    padding: 0.8rem 2rem;
    border: 2px solid var(--white);
    color: var(--white);
    font-weight: 600;
    border-radius: 50px;
}

.btn-footer-msg:hover {
    background: var(--white);
    color: var(--primary-dark);
}

.footer-col-right {
    background: #0b1120;
    padding: 4rem;
    display: flex;
    align-items: center;
}

.info-row {
    display: flex;
    gap: 1.5rem;
    margin-bottom: 2rem;
    align-items: flex-start;
}

.info-row i {
    font-size: 1.5rem;
    color: var(--accent-color);
    margin-top: 5px;
}

.footer-bottom-icons {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
}

.circle-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.1);
    color: white;
    transition: var(--transition);
}

.circle-icon:hover {
    background: var(--accent-color);
}

.footer-map-strip iframe {
    filter: grayscale(100%);
    transition: filter 0.3s;
}

.footer-map-strip iframe:hover {
    filter: none;
}

/* --- Floating --- */
.float-btn {
    position: fixed;
    width: 60px;
    height: 60px;
    background: #25D366;
    color: white;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 2rem;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
    z-index: 100;
    transition: transform 0.3s;
}

.float-whatsapp {
    bottom: 30px;
    right: 30px;
}

.float-phone {
    bottom: 30px;
    left: 30px;
    background: var(--primary-color);
}

.float-btn:hover {
    transform: scale(1.1);
}

.scroll-top {
    position: fixed;
    bottom: 110px;
    right: 35px;
    background: var(--primary-dark);
    color: white;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    pointer-events: none;
    transition: var(--transition);
    z-index: 99;
}

.scroll-top.visible {
    opacity: 1;
    pointer-events: all;
}

/* --- Responsive --- */
@media (max-width: 992px) {
    .hero-grid {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 3rem;
    }

    .hero-buttons {
        justify-content: center;
    }

    .service-card-horizontal {
        flex-direction: column;
    }

    .gallery-grid-3 {
        grid-template-columns: 1fr 1fr;
    }

    .footer-split-wrapper {
        flex-direction: column;
    }

    .menu-toggle {
        display: block;
    }

    .main-navigation {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: var(--white);
        padding: 2rem;
        box-shadow: var(--shadow-lg);
    }

    .main-navigation.active {
        display: block;
    }

    .main-navigation ul {
        flex-direction: column;
        align-items: center;
        gap: 1.5rem;
    }
}

@media (max-width: 768px) {
    .form-inputs {
        flex-direction: column;
    }

    .form-inputs input {
        margin-bottom: 1rem;
    }

    .form-inputs button {
        width: 100%;
    }

    .gallery-grid-3 {
        grid-template-columns: 1fr;
    }

    .hero-title {
        font-size: 2.5rem;
    }

    .values-flex {
        flex-direction: column;
        align-items: center;
    }
}

/* --- Cookie Banner --- */
.cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background-color: rgba(33, 33, 33, 0.95);
    color: var(--white);
    padding: 1.5rem;
    z-index: 9999;
    display: none;
    /* Hidden by default, shown by JS */
    box-shadow: 0 -4px 10px rgba(0, 0, 0, 0.1);
}

.cookie-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1.5rem;
}

.cookie-text p {
    margin: 0;
    font-size: 0.9rem;
    line-height: 1.5;
}

.cookie-text a {
    color: var(--accent-color);
    text-decoration: underline;
}

.cookie-buttons {
    display: flex;
    gap: 1rem;
    flex-shrink: 0;
}

.btn-cookie-accept {
    background-color: var(--accent-color);
    color: var(--white);
    border: none;
    padding: 0.5rem 1.25rem;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 600;
    transition: background 0.3s;
}

.btn-cookie-accept:hover {
    background-color: #009ec3;
}

@media (max-width: 768px) {
    .cookie-content {
        flex-direction: column;
        text-align: center;
    }
}