@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700&display=swap');

:root {
    --primary: #1D9DB9;
    --primary-light: #00D5B7;
    --secondary: #008FD5;
    --accent: #f43f5e;
    --text-dark: #0f172a;
    --text-light: #64748b;
    --bg-light: #f8fafc;
    --white: #ffffff;
    --glass: rgba(255, 255, 255, 0.9);
    --glass-border: rgba(255, 255, 255, 0.5);
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
    --transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

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

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

/* --- Layout --- */
.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* --- Language Switching --- */
/* Prevent hiding the root elements. Only target elements inside body */
body.es [lang="en"] { display: none !important; }
body.en [lang="es"] { display: none !important; }

/* Ensure inline elements don't become blocks */
span[lang], strong[lang], a[lang], i[lang] {
    display: inline-block;
}

body.es span[lang="es"], body.es strong[lang="es"], body.es a[lang="es"] {
    display: inline-block;
}

body.en span[lang="en"], body.en strong[lang="en"], body.en a[lang="en"] {
    display: inline-block;
}

/* --- Typography --- */
h1, h2, h3, h4 {
    color: var(--primary);
    font-weight: 700;
    line-height: 1.2;
}

h1 { font-size: 3.5rem; }
h2 { font-size: 2.5rem; margin-bottom: 1rem; }

/* --- Header --- */
header {
    height: 90px;
    display: flex;
    align-items: center;
    background: var(--glass);
    backdrop-filter: blur(12px);
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    transition: var(--transition);
}

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

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.logo {
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--primary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

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

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

.logo span { color: var(--secondary); }

.nav-links {
    display: flex;
    gap: 2rem;
    list-style: none;
    align-items: center;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-dark);
    font-weight: 500;
    transition: var(--transition);
}

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

/* --- Buttons --- */
.btn {
    display: inline-block;
    padding: 1rem 2rem;
    border-radius: 50px;
    font-weight: 600;
    text-decoration: none;
    transition: var(--transition);
    cursor: pointer;
    border: none;
}

.btn-primary {
    background: var(--secondary);
    color: var(--white);
    box-shadow: 0 10px 20px rgba(0, 212, 255, 0.3);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 30px rgba(0, 212, 255, 0.4);
}

.lang-toggle {
    background: rgba(0, 212, 255, 0.1);
    color: var(--secondary);
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.mobile-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--primary);
    font-size: 1.5rem;
    cursor: pointer;
}

/* --- Hero --- */
.hero {
    padding: 180px 0 100px;
    background: radial-gradient(circle at top right, rgba(14, 165, 233, 0.08), transparent 40%),
                radial-gradient(circle at bottom left, rgba(14, 165, 233, 0.05), transparent 40%),
                var(--white);
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('data:image/svg+xml,<svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><g fill="%230ea5e9" fill-opacity="0.03" fill-rule="evenodd"><circle cx="3" cy="3" r="1"/></g></svg>');
    z-index: 0;
}

.hero-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
    position: relative;
    z-index: 1;
}

.about-grid {
    grid-template-columns: 1fr 1.2fr;
}

.text-left-desktop {
    text-align: left;
}

.hero-badges {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.badge {
    background: rgba(0, 212, 255, 0.1);
    color: var(--secondary);
    padding: 0.4rem 1rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
}

.hero h1 span {
    display: block;
    color: var(--secondary);
}

.hero p {
    font-size: 1.25rem;
    color: var(--text-light);
    margin: 2rem 0;
}

.hero-cta {
    display: flex;
    gap: 1.5rem;
    align-items: center;
}

.hero-image {
    position: relative;
}

.hero-image img {
    width: 100%;
    height: auto;
    border-radius: 30px;
    box-shadow: var(--shadow);
}

.floating-card {
    position: absolute;
    bottom: -20px;
    left: -20px;
    background: var(--white);
    padding: 1.5rem;
    border-radius: 20px;
    box-shadow: var(--shadow);
    display: flex;
    align-items: center;
    gap: 1rem;
    animation: float 4s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-15px); }
}

/* --- Services --- */
.services { padding: 100px 0; background: var(--white); }

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

.grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

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

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

.service-card {
    background: var(--white);
    padding: 0;
    border-radius: 20px;
    overflow: hidden;
    transition: var(--transition);
    border: 1px solid #eef2f6;
    display: flex;
    flex-direction: column;
}

.service-card img {
    width: 100%;
    height: auto;
    transition: transform 0.5s ease;
}

.service-card:hover img {
    transform: scale(1.05);
}

.service-card-content {
    padding: 1.5rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

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

.icon-box {
    width: 50px;
    height: 50px;
    background: var(--bg-light);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: var(--primary);
    margin-bottom: 1rem;
}

.price-table-container {
    margin-top: 4rem;
    background: var(--white);
    border-radius: 30px;
    padding: 2rem;
    box-shadow: var(--shadow);
    overflow-x: auto;
}

.price-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 600px;
}

.price-table th, .price-table td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid #f1f5f9;
}

.price-table th {
    background: var(--primary);
    color: var(--white);
    font-weight: 600;
}

.price-table tr:hover {
    background: var(--bg-light);
}

.logos-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 2rem;
    padding: 3rem 0;
}

.logo-item {
    height: 40px;
    opacity: 0.7;
    filter: grayscale(1);
    transition: var(--transition);
}

.logo-item:hover {
    opacity: 1;
    filter: grayscale(0);
}

/* --- Contact Section --- */
.contact-section {
    padding: 100px 0;
    background: var(--primary);
    color: var(--white);
    position: relative;
}

.contact-section h2 { color: var(--white); }

.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6rem;
    align-items: start;
}

.info-item {
    margin-bottom: 2rem;
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.info-item i {
    font-size: 1.5rem;
    color: var(--secondary); /* Default color */
}

.contact-section .info-item i {
    color: var(--white); /* White in dark contact section */
}

.contact-form {
    background: var(--glass);
    padding: 3rem;
    border-radius: 30px;
    color: var(--text-dark);
}

.form-group { margin-bottom: 1.5rem; }

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.form-group input, .form-group select, .form-group textarea {
    width: 100%;
    padding: 1rem;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    outline: none;
    font-family: inherit;
    transition: var(--transition);
}

.form-group input[type="date"] {
    cursor: pointer;
    position: relative;
}

.form-group input:focus { border-color: var(--secondary); }

/* --- Mobile Menu --- */
.mobile-menu {
    position: fixed;
    top: 0;
    right: -100%;
    width: 100%;
    height: 100%;
    background: var(--white);
    z-index: 2000;
    padding: 4rem 2rem;
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    align-items: center;
}

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

.close-menu {
    position: absolute;
    top: 20px;
    right: 20px;
    font-size: 2.5rem;
    background: none;
    border: none;
    color: var(--text-dark);
    cursor: pointer;
}

.mobile-nav-links {
    list-style: none;
    text-align: center;
    width: 100%;
}

.mobile-nav-links li {
    margin-bottom: 2rem;
}

.mobile-nav-links a {
    font-size: 1.5rem;
    font-weight: 600;
    text-decoration: none;
    color: var(--text-dark);
}

.mobile-menu-footer {
    margin-top: auto;
    width: 100%;
}

/* --- Mobile Action Bar --- */
.mobile-action-bar {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background: var(--white);
    box-shadow: 0 -5px 20px rgba(0,0,0,0.1);
    z-index: 999;
    padding: 0.8rem 1.5rem;
    justify-content: center;
    align-items: center;
}

.mobile-action-bar .action-btn {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    font-size: 0.75rem;
    font-weight: 600;
    gap: 0.3rem;
}

.call-btn { color: var(--primary); }
.book-btn { color: var(--white); background: var(--secondary); border-radius: 12px; padding: 0.5rem; }

/* --- Responsive --- */
@media (max-width: 992px) {
    .container, .container-fluid { padding: 0 1.5rem; }
    .hero-content, .contact-grid, .about-grid {
        grid-template-columns: 1fr;
        text-align: center;
    }
    .text-left-desktop { text-align: center; }
    .hero-cta { justify-content: center; flex-direction: column; }
    .hero h1 { font-size: 2.2rem; }
    .nav-links { display: none; }
    .btn-cta { display: none; }
    .mobile-toggle { display: block; }
    .floating-card { display: none; }
    
    .services { padding: 60px 0; }
    .price-table-container { padding: 1rem; }
    .mobile-action-bar { display: flex; gap: 1rem; }
    
    .info-item {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .map-container {
        margin-top: 2rem;
        width: 100%;
    }
    
    /* Ensure padding for bottom bar */
    body { padding-bottom: 70px; }
}

@media (max-width: 600px) {
    .price-table-container {
        padding: 0; /* No padding needed for the container anymore */
        background: transparent;
        box-shadow: none;
        margin-top: 2rem;
    }

    .price-table {
        min-width: 0 !important;
        width: 100%;
        border-spacing: 0 1rem; /* Add space between rows */
        border-collapse: separate;
    }
    
    .price-table thead {
        display: none; /* Hide the redundant blue header on mobile */
    }
    
    .price-table tr {
        display: block;
        border: 1px solid rgba(0,0,0,0.05);
        margin-bottom: 1.5rem;
        border-radius: 20px;
        padding: 1.5rem;
        background: #ffffff;
        box-shadow: 0 10px 25px rgba(0,0,0,0.05); /* Softer, more premium shadow */
    }
    
    .price-table td {
        display: block;
        border: none;
        padding: 0;
        width: 100%;
    }
    
    .price-table td:first-child {
        font-weight: 700;
        color: var(--text-dark);
        font-size: 1rem;
        margin-bottom: 1.2rem;
        line-height: 1.4;
    }
    
    .price-table td:last-child {
        color: var(--secondary);
        font-weight: 700;
        font-size: 1.8rem; /* More compact and professional */
        text-align: right;
        line-height: 1;
        display: flex;
        justify-content: space-between;
        align-items: flex-end;
    }
    
    .price-table td:last-child::before {
        content: attr(data-label);
        font-weight: 600;
        color: var(--text-light);
        font-size: 0.7rem;
        text-transform: uppercase;
        letter-spacing: 0.5px;
        margin-bottom: 0.3rem;
    }

    /* Appointment Form Mobile Optimization */
    .appointment-container {
        grid-template-columns: 1fr;
        gap: 0;
        border-radius: 20px;
    }

    .appointment-form-side {
        padding: 2rem 1.5rem; /* Reduced for wider fields */
    }

    .appointment-image {
        height: 250px;
    }

    .appointment-form-side h2 {
        font-size: 1.6rem;
        margin-bottom: 1.5rem;
    }

    .form-group {
        margin-bottom: 1.2rem;
    }

    .appointment-form {
        max-width: none; /* Removed the 500px limit */
        width: 100%;
    }

    .appointment-form .btn {
        width: 100%;
        padding: 1rem;
    }
}

/* --- Back to Top --- */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: var(--secondary);
    color: var(--white);
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    cursor: pointer;
    box-shadow: var(--shadow);
    z-index: 998;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
}

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

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

@media (max-width: 992px) {
    .back-to-top {
        bottom: 90px; /* Above mobile action bar */
        right: 20px;
        width: 45px;
        height: 45px;
    }
}
