:root {
    --primary-color: #0f6b5b;
    --primary-dark: #0b5246;
    --primary-light: #e5f4ef;
    --secondary-color: #1f8f7a;
    --accent-color: #d9a441;
    --text-color: #2b2b2b;
    --light-text: #555555;
    --bg-color: #ffffff;
    --bg-light: #f4f7f6;
    --bg-dark: #162626;
    --white: #ffffff;
    --border-radius: 12px;
    --border-radius-sm: 8px;
    --transition: all 0.3s ease;
    --transition-fast: all 0.2s ease;
    --container-width: 1200px;
    --spacing-sm: 1rem;
    --spacing-md: 2rem;
    --spacing-lg: 4rem;
    --shadow-sm: 0 2px 8px rgba(0,0,0,0.08);
    --shadow-md: 0 8px 24px rgba(0,0,0,0.12);
    --shadow-lg: 0 16px 48px rgba(0,0,0,0.15);
}


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

html {
    scroll-behavior: smooth;
}

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

h1,
h2,
h3,
h4 {
    font-family: 'Poppins', sans-serif;
    letter-spacing: -0.3px;
}


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

ul {
    list-style: none;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 var(--spacing-md);
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 1rem 2rem;
    border-radius: var(--border-radius-sm);
    font-weight: 600;
    text-align: center;
    cursor: pointer;
    border: none;
    transition: var(--transition);
    font-size: 0.95rem;
    letter-spacing: 0.5px;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: var(--white);
    box-shadow: 0 4px 15px rgba(0, 86, 179, 0.3);
}

.btn-primary:hover {
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary-color) 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 86, 179, 0.4);
}

.btn-secondary {
    background-color: transparent;
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
}

.btn-secondary:hover {
    background-color: var(--primary-color);
    color: var(--white);
}

.btn-block {
    display: block;
    width: 100%;
}

/* Header */
.header {
    background-color: var(--white);
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    position: sticky;
    top: 0;
    z-index: 1000;
    padding: 1rem 0;
}

.header a {
    font-family: 'Source Sans 3', sans-serif;
}


.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo img {
    height: 50px; /* Adjust based on logo aspect ratio */
}

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

.nav-list a {
    font-weight: 500;
    color: var(--text-color);
}

.nav-list a:hover {
    color: var(--primary-color);
}

.btn-nav {
    background-color: var(--primary-color);
    color: var(--white) !important;
    padding: 0.5rem 1rem;
    border-radius: var(--border-radius);
}

.btn-nav:hover {
    background-color: #004494;
}

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 10px;
    min-width: 44px;
    min-height: 44px;
    align-items: center;
    justify-content: center;
}

.mobile-menu-btn span {
    display: block;
    width: 26px;
    height: 3px;
    background-color: var(--primary-color);
    margin: 5px 0;
    border-radius: 2px;
    transition: all 0.3s ease;
}

/* Hero Section */
.hero {
    position: relative;
    height: 80vh;
    min-height: 500px;
    display: flex;
    align-items: center;
    color: var(--white);
    overflow: hidden;
}

.hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
}

.hero-bg::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1;
}

.hero-bg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: brightness(0.6); /* Darken image for text readability */
}

.hero-content {
    max-width: 820px;
}


.hero h1 {
    font-size: 3.2rem;
    margin-bottom: 1.5rem;
    font-weight: 600;
    line-height: 1.15;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.hero p {
    font-size: 1.2rem;
    margin-bottom: 2.5rem;
    opacity: 0.95;
    max-width: 620px;
}


.hero-buttons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}


.hero .btn-secondary {
    border-color: var(--white);
    color: var(--white);
}

.hero .btn-secondary:hover {
    background-color: var(--white);
    color: var(--primary-color);
}

/* Statistics Banner */
.stats-banner {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    padding: 1.8rem 0;
    color: var(--white);
}


.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 2rem;
    text-align: center;
}


.stat-item {
    padding: 0.6rem 0.8rem;
    position: relative;
    display: flex;
    flex-direction: column;
}


.stat-item:not(:last-child)::after {
    content: '';
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    height: 60%;
    width: 1px;
    background: rgba(255,255,255,0.3);
}

.stat-number {
    display: block;
    font-size: 1.55rem;
    font-weight: 700;
    margin-bottom: 0.35rem;
}


.stat-label {
    font-size: 0.8rem;
    opacity: 0.9;
    text-transform: uppercase;
    letter-spacing: 1px;
}




.stat-label {
    font-size: 0.95rem;
    opacity: 0.9;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Sections General */
.section {
    padding: var(--spacing-lg) 0;
}

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

.bg-dark {
    background-color: var(--bg-dark);
    color: var(--white);
}

.section-header {
    text-align: center;
    margin-bottom: 3rem;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

.section-header h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: var(--primary-color);
    position: relative;
    display: inline-block;
}

.section-header h2::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    border-radius: 2px;
}

.section-header p {
    font-size: 1.05rem;
    color: var(--light-text);
    margin-top: 1rem;
    max-width: 640px;
    margin-left: auto;
    margin-right: auto;
}


/* Why Us Section (Refined) */
.why-us-wrapper {
    display: flex;
    gap: 3rem; /* Reduced gap from 5rem */
    align-items: center;
    position: relative;
}

.why-us-image {
    flex: 1;
    border-radius: 20px; /* Slightly smaller radius */
    position: relative; 
    z-index: 1;
    max-width: 500px; /* Limit image width to reduce overall height if flex grows too much */
}

/* Decorative backdrop for image */
.why-us-image::before {
    content: '';
    position: absolute;
    top: 15px; /* Reduced offset */
    left: -15px; /* Reduced offset */
    width: 100%;
    height: 100%;
    background-color: var(--primary-light);
    border-radius: 20px;
    z-index: -1;
    transition: transform 0.4s ease;
}

.why-us-image:hover::before {
    transform: translate(-5px, 5px);
}

.why-us-image img {
    border-radius: 20px;
    box-shadow: 0 15px 40px rgba(0,0,0,0.1); /* Slightly smaller shadow */
    display: block;
    width: 100%;
    transition: transform 0.4s ease;
}

.why-us-image:hover img {
    transform: translateY(-3px);
}

.why-us-content {
    flex: 1;
}

.section-header-left {
    margin-bottom: 2rem; /* Reduced from 3rem */
    position: relative;
}

/* Decorative line above title */
.section-header-left::before {
    content: '';
    display: block;
    width: 30px; /* Smaller line */
    height: 3px;
    background: var(--primary-color);
    margin-bottom: 1rem;
    border-radius: 2px;
}

.section-header-left h2 {
    font-size: 2.2rem; /* Reduced from 2.8rem */
    color: var(--primary-dark);
    margin-bottom: 0.5rem;
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: -0.5px;
}

.subtitle {
    font-size: 1.1rem; /* Reduced from 1.25rem */
    color: var(--light-text);
    font-weight: 400;
    margin-bottom: 1.5rem; /* Reduced from 2rem */
    display: block;
}

.features-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem; /* Reduced gap from 1.5rem */
}

.feature-item {
    display: flex;
    gap: 1rem; /* Reduced gap */
    align-items: flex-start;
    padding: 1rem; /* Reduced padding from 1.5rem */
    border-radius: 12px;
    transition: all 0.3s ease;
    border: 1px solid transparent;
}

.feature-item:hover {
    background: var(--white);
    box-shadow: 0 5px 15px rgba(0,0,0,0.05); /* Smaller shadow */
    border-color: rgba(0,0,0,0.05);
    transform: translateX(5px);
}

.feature-icon {
    color: var(--primary-color);
    background: #e6f2ff;
    width: 48px; /* Reduced from 60px */
    height: 48px; /* Reduced from 60px */
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all 0.3s ease;
}

.feature-icon svg {
    width: 24px; /* Reduced from 28px */
    height: 24px;
    stroke-width: 2;
}

.feature-item:hover .feature-icon {
    background: var(--primary-color);
    color: var(--white);
    transform: rotate(-5deg) scale(1.1);
    border-radius: 50%;
}

.feature-text h3 {
    font-size: 1.1rem; /* Reduced from 1.2rem */
    margin-bottom: 0.25rem;
    color: var(--text-color);
    font-weight: 700;
}

.feature-text p {
    color: var(--light-text);
    font-size: 0.9rem; /* Reduced from 0.95rem */
    line-height: 1.5;
    margin: 0;
}

/* Treatments Grid */
.treatments-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    width: 100%;
}

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

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

.treatment-card {
    position: relative;
    height: 400px;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 2rem;
    border: none;
    border-radius: 0;
    overflow: hidden;
    z-index: 1;
    outline: 1px solid rgba(255,255,255,0.1);
}

.treatment-card > * {
    max-width: 320px;
}


/* Background classes */
.bg-implantes { background-image: url('images/tratamientos/tratamientos-revision-odontologica-01.png'); }
.bg-ortodoncia { background-image: url('images/tratamientos/tratamientos-procedimiento-odontologico-02.png'); }
.bg-protesis { background-image: url('images/tratamientos/clinica-instrumental-02.jpg'); }
.bg-estetica { background-image: url('images/tratamientos/tratamiento-dental-01.jpg'); }
.bg-cirugia { background-image: url('images/tratamientos/tratamientos-rayos-x-diagnostico-01.png'); }
.bg-facial { background-image: url('images/tratamientos/tratamientos-protesis-modelo-01.jpg'); }


.treatment-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.55); /* Dark overlay - mejorado para WCAG */
    z-index: -1;
    transition: background 0.3s ease;
}

.treatment-card:hover::before {
    background: rgba(0, 0, 0, 0.65);
}

.treatment-card h3 {
    color: var(--white);
    font-size: 1.8rem;
    margin-bottom: 2rem;
    font-weight: 500;
}

.treatment-card p {
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.95rem;
    margin-bottom: 1.5rem;
}


.btn-treatment {
    border: 1px solid var(--white);
    color: var(--white);
    padding: 12px 24px;
    text-transform: none; /* As per image "Conocer tratamiento" */
    font-size: 1rem;
    transition: all 0.3s ease;
    background: transparent;
    display: inline-block;
}

.btn-treatment:hover {
    background: var(--white);
    color: var(--text-color);
}

/* Team Section */
.team-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2.2rem;
}

.team-card {
    background: linear-gradient(180deg, #ffffff 0%, #f5faf8 100%);
    padding: 2.4rem 2.2rem;
    border-radius: 20px;
    text-align: left;
    box-shadow: 0 12px 30px rgba(15, 107, 91, 0.12);
    transition: var(--transition);
    border: 1px solid rgba(15, 107, 91, 0.12);
    position: relative;
    overflow: hidden;
}

.team-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at top right, rgba(31, 143, 122, 0.18), transparent 55%);
    opacity: 0.8;
    pointer-events: none;
}

.team-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 18px 40px rgba(15, 107, 91, 0.18);
}

.team-photo {
    width: 170px;
    height: 170px;
    border-radius: 28px;
    overflow: hidden;
    margin: 0 0 1.5rem;
    border: 1px solid rgba(15, 107, 91, 0.25);
    box-shadow: 0 12px 20px rgba(15, 107, 91, 0.18);
    background-color: var(--bg-light);
    position: relative;
    z-index: 1;
}

.team-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top center;
    transition: var(--transition);
}

.team-card:hover .team-photo img {
    transform: scale(1.06);
}

.team-card h3 {
    margin-bottom: 0.4rem;
    color: var(--text-color);
    font-size: 1.4rem;
    position: relative;
    z-index: 1;
}

.team-role {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    color: var(--primary-dark);
    font-weight: 600;
    margin-bottom: 1rem;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    background: rgba(15, 107, 91, 0.12);
    padding: 0.35rem 0.75rem;
    border-radius: 999px;
    position: relative;
    z-index: 1;
}

.team-desc {
    color: var(--light-text);
    font-size: 0.95rem;
    line-height: 1.6;
    position: relative;
    z-index: 1;
}



/* Reviews Section - Dark Version */
#resenas {
    background-color: #0b2a26;
    color: var(--white);
    padding-top: 5rem;
    padding-bottom: 5rem;
}


#resenas .section-header h2 {
    color: var(--white);
}

#resenas .section-header p {
    color: rgba(255, 255, 255, 0.7);
}

#resenas .section-header h2::after {
    background: linear-gradient(90deg, var(--white), transparent);
}

.carousel-container {
    overflow: hidden;
    width: 100%;
    position: relative;
    padding: 1rem 0;
}

.carousel-pause-btn {
    position: absolute;
    top: 1rem;
    right: 1rem;
    z-index: 10;
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: white;
    transition: all 0.3s ease;
}

.carousel-pause-btn:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: scale(1.1);
}

.carousel-pause-btn:focus {
    outline: 2px solid white;
    outline-offset: 2px;
}

.carousel-paused .carousel-track {
    animation-play-state: paused;
}

.carousel-track {
    display: flex;
    gap: 2rem;
    width: max-content;
    animation: scroll 40s linear infinite;
}

.carousel-track:hover {
    animation-play-state: paused;
}

@keyframes scroll {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(calc(-100% / 3 * 2)); /* Adjust based on number of items */
    }
}

.review-card {
    background: #0c2d29;
    padding: 2.5rem 2rem;
    border-radius: var(--border-radius);
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    border: 1px solid rgba(255,255,255,0.05);
    width: 350px;
    flex-shrink: 0;
    position: relative;
    color: var(--white);
}


.review-card::before {
    content: '"';
    position: absolute;
    top: 15px;
    left: 20px;
    font-size: 4rem;
    color: rgba(255, 255, 255, 0.1);
    font-family: Georgia, serif;
    line-height: 1;
}

.stars {
    color: #f1c40f;
    margin-bottom: 1rem;
    font-size: 1.2rem;
}

.review-text {
    font-style: italic;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

.review-author {
    font-weight: 600;
    color: var(--secondary-color);
    font-size: 0.95rem;
    text-align: right;
}

.reviews-source {
    text-align: center;
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.6);
    margin-top: 2rem;
}

.reviews-source a {
    color: var(--white);
    text-decoration: underline;
}

/* Footer Logo Text */
.footer-logo-text {
    text-align: center;
    margin-bottom: 1rem;
}

.footer-logo-text h3 {
    color: var(--white);
    font-size: 2rem;
    margin-bottom: 0.2rem;
    letter-spacing: 2px;
}

.footer-logo-text p {
    color: #888;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Locations */
.locations-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 2rem;
}

.location-card {
    background: var(--white);
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    transition: var(--transition);
}

.location-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0,0,0,0.1);
}

.location-image {
    height: 260px;
}

.location-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}


.location-info {
    padding: 2rem;
}

.location-info h3 {
    margin-bottom: 1rem;
    color: var(--primary-color);
    font-size: 1.5rem;
}

.location-info .address {
    margin-bottom: 1rem;
    font-weight: 500;
}

.contact-details p {
    margin-bottom: 0.5rem;
}

.contact-details a {
    color: var(--text-color);
}

.contact-details a:hover {
    color: var(--primary-color);
}

.schedule {
    margin-top: 1rem;
    margin-bottom: 1.5rem;
    color: var(--light-text);
    font-size: 0.9rem;
    background: var(--bg-light);
    padding: 0.5rem;
    border-radius: 4px;
    display: inline-block;
}

.btn-link {
    color: var(--primary-color);
    font-weight: 600;
    font-size: 0.9rem;
}

.btn-link:hover {
    text-decoration: underline;
}

/* Free Services Section */
.free-services-section {
    background: linear-gradient(180deg, var(--bg-light) 0%, var(--white) 100%);
}

.free-services-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
}

.free-service-card {
    background: var(--white);
    padding: 2rem 1.5rem;
    border-radius: var(--border-radius);
    text-align: center;
    border: 2px solid transparent;
    transition: var(--transition);
    box-shadow: var(--shadow-sm);
}

.free-service-card:hover {
    border-color: var(--primary-color);
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
}

.free-service-icon {
    width: 70px;
    height: 70px;
    background: var(--primary-light);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    color: var(--primary-color);
    transition: var(--transition);
}

.free-service-card:hover .free-service-icon {
    background: var(--primary-color);
    color: var(--white);
    transform: scale(1.1);
}

.free-service-card h3 {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
    color: var(--text-color);
}

.free-service-card p {
    font-size: 0.9rem;
    color: var(--light-text);
}

/* FAQ Section */
.faq-container {
    max-width: 800px;
    margin: 0 auto;
}

.faq-item {
    background: var(--white);
    border-radius: var(--border-radius-sm);
    margin-bottom: 1rem;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    border: 1px solid #eee;
}

.faq-question {
    width: 100%;
    padding: 1.25rem 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: none;
    border: none;
    cursor: pointer;
    font-family: inherit;
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-color);
    text-align: left;
    transition: var(--transition);
}

.faq-question:hover {
    color: var(--primary-color);
}

.faq-question svg {
    flex-shrink: 0;
    transition: transform 0.3s ease;
    color: var(--primary-color);
}

.faq-item.active .faq-question svg {
    transform: rotate(180deg);
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease, padding 0.3s ease;
}

.faq-item.active .faq-answer {
    max-height: 200px;
}

.faq-answer p {
    padding: 0 1.5rem 1.25rem;
    color: var(--light-text);
    line-height: 1.7;
}

/* Contact Section - Enhanced Design */
#contacto.section {
    padding: 5rem 0;
    background: linear-gradient(135deg, #0b2f2b 0%, #0f3b35 50%, #0c2d29 100%);
    position: relative;
    overflow: hidden;
}


/* Decorative background pattern */
#contacto.section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image:
        radial-gradient(circle at 20% 50%, rgba(0, 168, 232, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(0, 86, 179, 0.15) 0%, transparent 50%);
    pointer-events: none;
}

/* Floating circles decoration */
#contacto.section::after {
    content: '';
    position: absolute;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(0, 168, 232, 0.08) 0%, transparent 70%);
    border-radius: 50%;
    top: -100px;
    right: -100px;
    pointer-events: none;
    animation: float 20s infinite ease-in-out;
}

@keyframes float {
    0%, 100% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(-30px, 30px) scale(1.1); }
}

.contact-wrapper {
    display: grid;
    grid-template-columns: 1fr 1.1fr;
    gap: 4rem;
    align-items: start;
    position: relative;
    z-index: 1;
}

.contact-text h2 {
    font-size: 2.8rem;
    margin-bottom: 1rem;
    font-weight: 600;
    background: linear-gradient(135deg, #ffffff 0%, #d8efe9 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: fadeInDown 0.8s ease-out;
}


@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.contact-text > p {
    opacity: 0.9;
    font-size: 1.05rem;
    line-height: 1.7;
    color: rgba(255, 255, 255, 0.85);
    margin-bottom: 2.5rem;
    max-width: 520px;
    animation: fadeIn 1s ease-out 0.3s backwards;
}


@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 0.9;
    }
}

.contact-info-cards {
    margin-top: 2.5rem;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.contact-info-item {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    padding: 1.25rem 1.5rem;
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(10px);
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    animation: fadeInLeft 0.6s ease-out backwards;
}

.contact-info-item:nth-child(1) { animation-delay: 0.1s; }
.contact-info-item:nth-child(2) { animation-delay: 0.2s; }
.contact-info-item:nth-child(3) { animation-delay: 0.3s; }

@keyframes fadeInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.contact-info-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 4px;
    background: linear-gradient(180deg, var(--secondary-color), var(--primary-color));
    transition: width 0.3s ease;
}

.contact-info-item:hover {
    background: rgba(255, 255, 255, 0.12);
    transform: translateX(8px);
    border-color: rgba(255, 255, 255, 0.2);
}

.contact-info-item:hover::before {
    width: 100%;
    opacity: 0.1;
}

.contact-icon {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, var(--secondary-color), var(--primary-color));
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-shadow: 0 8px 20px rgba(0, 168, 232, 0.3);
    transition: all 0.3s ease;
}

.contact-info-item:hover .contact-icon {
    transform: scale(1.1) rotate(-5deg);
    box-shadow: 0 12px 28px rgba(0, 168, 232, 0.4);
}

.contact-icon svg {
    color: white;
    width: 22px;
    height: 22px;
}

.contact-info-text {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.contact-info-text strong {
    font-size: 1rem;
    font-weight: 600;
    color: #ffffff;
}

.contact-info-text span {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.7);
}

/* Enhanced Form Design */
.contact-form-wrapper {
    position: relative;
    animation: fadeInUp 0.8s ease-out;
}

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

.contact-form {
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(20px);
    padding: 2.5rem;
    border-radius: 24px;
    color: var(--text-color);
    box-shadow:
        0 20px 60px rgba(0, 0, 0, 0.3),
        0 0 0 1px rgba(255, 255, 255, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.5);
    position: relative;
    overflow: hidden;
}

/* Gradient shine effect */
.contact-form::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.5s ease;
}

.contact-form:hover::before {
    left: 100%;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.25rem;
}

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

.form-group label {
    display: block;
    margin-bottom: 0.6rem;
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--text-color);
    transition: color 0.3s ease;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 0.95rem 1.1rem;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    font-family: inherit;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    background: #f9fafb;
}

.form-group input:hover,
.form-group textarea:hover {
    border-color: #d1d5db;
    background: #ffffff;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    background: #ffffff;
    box-shadow:
        0 0 0 4px rgba(0, 86, 179, 0.08),
        0 4px 12px rgba(0, 86, 179, 0.12);
    transform: translateY(-2px);
}

.form-group textarea {
    resize: vertical;
    min-height: 100px;
}

.checkbox-group {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    background: #f0f9ff;
    padding: 1rem;
    border-radius: 10px;
    border: 1px solid #e0f2fe;
    margin-bottom: 1.5rem;
}

.checkbox-group input[type="checkbox"] {
    width: 20px;
    height: 20px;
    margin-top: 2px;
    cursor: pointer;
    accent-color: var(--primary-color);
}

.checkbox-group label {
    margin-bottom: 0;
    font-size: 0.875rem;
    color: var(--text-color);
    line-height: 1.5;
    cursor: pointer;
}

/* Enhanced Submit Button */
.contact-form .btn-primary {
    width: 100%;
    padding: 1.2rem 2rem;
    font-size: 1.05rem;
    font-weight: 700;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    border: none;
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow:
        0 10px 30px rgba(0, 86, 179, 0.3),
        0 1px 3px rgba(0, 0, 0, 0.2);
    position: relative;
    overflow: hidden;
}

.contact-form .btn-primary::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    transform: translate(-50%, -50%);
    transition: width 0.6s ease, height 0.6s ease;
}

.contact-form .btn-primary:hover::before {
    width: 400px;
    height: 400px;
}

.contact-form .btn-primary:hover {
    transform: translateY(-3px);
    box-shadow:
        0 15px 40px rgba(0, 86, 179, 0.4),
        0 5px 15px rgba(0, 0, 0, 0.2);
}

.contact-form .btn-primary:active {
    transform: translateY(-1px);
}

/* Placeholder styles */
.form-group input::placeholder,
.form-group textarea::placeholder {
    color: #9ca3af;
    opacity: 1;
}

.form-group input:focus::placeholder,
.form-group textarea:focus::placeholder {
    opacity: 0.5;
}

/* Form success/error states (for future implementation) */
.form-group.success input,
.form-group.success textarea {
    border-color: #10b981;
}

.form-group.error input,
.form-group.error textarea {
    border-color: #ef4444;
}

/* Responsive adjustments for contact section */
@media (max-width: 900px) {
    .contact-wrapper {
        grid-template-columns: 1fr;
        gap: 3rem;
    }

    .contact-text h2 {
        font-size: 2.2rem;
    }

    #contacto.section {
        padding: 4rem 0;
    }

    .form-row {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .contact-text h2 {
        font-size: 1.8rem;
    }

    .contact-form {
        padding: 2rem 1.5rem;
    }

    .contact-info-cards {
        gap: 1rem;
    }

    .contact-info-item {
        padding: 1rem;
    }
}

@media (max-width: 480px) {
    #contacto.section::after {
        width: 300px;
        height: 300px;
    }

    .contact-text h2 {
        font-size: 1.6rem;
    }

    .contact-form {
        padding: 1.5rem;
    }
}

/* Footer */
.footer {
    background-color: #111;
    color: #888;
    padding: 4rem 0;
    text-align: center;
    border-top: 1px solid #222;
}

.footer-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2rem;
}

.footer-links {
    display: flex;
    gap: 2rem;
    flex-wrap: wrap;
    justify-content: center;
}

.footer-links a {
    font-size: 0.9rem;
}

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

/* Accessibility - Focus States */
a:focus,
button:focus,
input:focus,
textarea:focus,
select:focus {
    outline: 3px solid var(--primary-color);
    outline-offset: 2px;
}

.btn:focus {
    outline: 3px solid var(--primary-color);
    outline-offset: 2px;
}

.nav-list a:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 4px;
    border-radius: 4px;
}

.faq-question:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: -2px;
}

.mobile-menu-btn:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
    border-radius: 4px;
}

/* Skip to main content link (hidden by default, visible on focus) */
.skip-to-main {
    position: absolute;
    left: -9999px;
    z-index: 999;
    padding: 1em;
    background-color: var(--primary-color);
    color: white;
    text-decoration: none;
}

.skip-to-main:focus {
    left: 50%;
    transform: translateX(-50%);
    top: 10px;
}

/* Responsive */
@media (max-width: 1024px) {
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .stat-item:nth-child(2)::after {
        display: none;
    }
    
    .free-services-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 900px) {
    .why-us-wrapper {
        flex-direction: column;
    }
}

@media (max-width: 768px) {
    .nav-list {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: var(--white);
        flex-direction: column;
        padding: 1rem;
        box-shadow: 0 5px 10px rgba(0,0,0,0.1);
    }

    .nav-list.active {
        display: flex;
    }

    .mobile-menu-btn {
        display: flex;
        flex-direction: column;
    }

    .hero h1 {
        font-size: 2rem;
    }
    
    .stats-grid {
        grid-template-columns: 1fr 1fr;
        gap: 1rem;
    }
    
    .stat-item::after {
        display: none !important;
    }
    
    .stat-number {
        font-size: 2rem;
    }
    
    .stat-label {
        font-size: 0.8rem;
    }
    
    .free-services-grid {
        grid-template-columns: 1fr 1fr;
    }
    
    .locations-grid {
        grid-template-columns: 1fr;
    }

    .section-header h2 {
        font-size: 2rem;
    }
}

@media (max-width: 480px) {
    .stats-grid,
    .free-services-grid {
        grid-template-columns: 1fr;
    }

    .hero-buttons {
        flex-direction: column;
    }

    .hero-buttons .btn {
        width: 100%;
        text-align: center;
        padding: 1.1rem 2rem;
        min-height: 48px; /* WCAG area tactil minima */
    }

    .btn {
        min-height: 48px;
        padding: 1rem 1.5rem;
    }

    .btn-treatment {
        padding: 14px 28px;
        min-height: 48px;
    }
}

/* Mobile Landscape Improvements */
@media (max-width: 900px) and (orientation: landscape) {
    .hero {
        height: 100vh;
        min-height: 450px;
    }

    .hero h1 {
        font-size: 2rem;
        margin-bottom: 1rem;
    }

    .hero p {
        font-size: 1rem;
        margin-bottom: 1.5rem;
    }

    .section {
        padding: 2rem 0;
    }

    .stats-banner {
        padding: 2rem 0;
    }
}

/* Improved Stats Grid for Small Screens */
@media (max-width: 600px) {
    .stats-grid {
        gap: 1rem;
    }

    .stat-number {
        font-size: 1.8rem;
    }
}

/* Animations */
.animate-element {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.animate-element.animate-in {
    opacity: 1;
    transform: translateY(0);
}

/* Stagger animation for grid items */
.treatments-grid .animate-element:nth-child(1) { transition-delay: 0.1s; }
.treatments-grid .animate-element:nth-child(2) { transition-delay: 0.2s; }
.treatments-grid .animate-element:nth-child(3) { transition-delay: 0.3s; }
.treatments-grid .animate-element:nth-child(4) { transition-delay: 0.4s; }
.treatments-grid .animate-element:nth-child(5) { transition-delay: 0.5s; }
.treatments-grid .animate-element:nth-child(6) { transition-delay: 0.6s; }

.free-services-grid .animate-element:nth-child(1) { transition-delay: 0.1s; }
.free-services-grid .animate-element:nth-child(2) { transition-delay: 0.15s; }
.free-services-grid .animate-element:nth-child(3) { transition-delay: 0.2s; }
.free-services-grid .animate-element:nth-child(4) { transition-delay: 0.25s; }

.stats-grid .animate-element:nth-child(1) { transition-delay: 0.1s; }
.stats-grid .animate-element:nth-child(2) { transition-delay: 0.2s; }
.stats-grid .animate-element:nth-child(3) { transition-delay: 0.3s; }
.stats-grid .animate-element:nth-child(4) { transition-delay: 0.4s; }

/* Pulse animation for CTA buttons */
@keyframes pulse {
    0% { box-shadow: 0 0 0 0 rgba(0, 86, 179, 0.4); }
    70% { box-shadow: 0 0 0 15px rgba(0, 86, 179, 0); }
    100% { box-shadow: 0 0 0 0 rgba(0, 86, 179, 0); }
}

.btn-primary:hover {
    animation: pulse 1.5s infinite;
}


/* ===== PROCESO / PRIMERA VISITA - Darkened ===== */
#proceso {
    background-color: var(--primary-light); /* Off-blue background */
}

.process-steps {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
    max-width: 1000px;
    margin: 0 auto;
}

.process-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 0.75rem;
    background: white;
    padding: 2rem 1rem;
    border-radius: 12px;
    box-shadow: 0 5px 20px rgba(0, 86, 179, 0.08); /* Blue tinted shadow */
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid rgba(0, 86, 179, 0.05);
}

.process-step:hover {
    transform: translateY(-8px);
    box-shadow: 0 10px 30px rgba(0, 86, 179, 0.15);
}

.step-number {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    font-weight: 700;
    box-shadow: 0 4px 10px rgba(0, 86, 179, 0.3);
    margin-bottom: 0.5rem;
}

.step-content h3 {
    color: var(--primary-dark);
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
    font-weight: 600;
}

.step-content p {
    color: var(--light-text);
    font-size: 0.95rem;
}

/* Add subtle enhancement to Nosotros section */
#nosotros {
    background: linear-gradient(to right, #ffffff, #f4f6f9);
}

.step-content p {
    color: var(--text-light);
    margin: 0;
    font-size: 0.85rem;
    line-height: 1.5;
}

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

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