/* Reset y estilos generales */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #1e88e5;
    --secondary-color: #4caf50;
    --accent-color: #e3f2fd;
    --text-color: #333;
    --light-color: #f8f9fa;
    --dark-color: #212529;
    --white: #fff;
    --gray: #6c757d;
    --light-gray: #e9ecef;
    --box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s ease;
}

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

h1, h2, h3, h4, h5, h6 {
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1rem;
}

p {
    margin-bottom: 1rem;
}

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

ul {
    list-style: none;
}

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

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

.section-title {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 3rem;
    position: relative;
}

.section-title span {
    color: var(--primary-color);
}

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

.btn {
    display: inline-block;
    background: var(--primary-color);
    color: var(--white);
    padding: 12px 30px;
    border-radius: 50px;
    font-weight: 600;
    transition: var(--transition);
    border: none;
    cursor: pointer;
}

.btn:hover {
    background: #1565c0;
    transform: translateY(-3px);
    box-shadow: var(--box-shadow);
}

/* Encabezado */
header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background: var(--white);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    padding: 15px 0;
}

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

.logo h2 {
    font-size: 1.8rem;
    color: var(--dark-color);
}

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

.navigation {
    display: flex;
    align-items: center;
}

.nav-menu {
    display: flex;
}

.nav-menu li {
    margin-left: 30px;
}

.nav-menu a {
    color: var(--dark-color);
    font-weight: 600;
    position: relative;
}

.nav-menu a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary-color);
    transition: var(--transition);
}

.nav-menu a:hover::after {
    width: 100%;
}

.menu-toggle {
    display: none;
    flex-direction: column;
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
}

.menu-toggle span {
    width: 25px;
    height: 3px;
    background: var(--dark-color);
    margin: 3px 0;
    transition: var(--transition);
}

/* Hero Section / Carrusel */
.hero {
    height: 100vh;
    margin-top: 70px;
    position: relative;
}

.carousel {
    position: relative;
    height: 100%;
    overflow: hidden;
}

.carousel-inner {
    height: 100%;
    position: relative;
}

.carousel-item {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 1s ease;
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: var(--white);
}

.carousel-item:nth-child(1) {
    background: linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5)), url('https://orthoclear.ec/assets/imag/orthodontics-1-1200x400.jpg');
    background-size: cover;
    background-position: center;
}

.carousel-item:nth-child(2) {
    background: linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5)), url('https://orthoclear.ec/assets/imag/orthodontics-2-1200x400.png');
    background-size: cover;
    background-position: center;
}

.carousel-item:nth-child(3) {
    background: linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5)), url('https://orthoclear.ec/assets/imag/orthodontics-3-1200x400.png');
    background-size: cover;
    background-position: center;
}

.carousel-item.active {
    opacity: 1;
}

.carousel-content {
    max-width: 800px;
    padding: 0 20px;
}

.carousel-content h1 {
    font-size: 3.5rem;
    margin-bottom: 20px;
    text-shadow: 2px 2px 5px rgba(0, 0, 0, 0.5);
}

.carousel-content p {
    font-size: 1.2rem;
    margin-bottom: 30px;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.5);
}

.carousel-controls {
    position: absolute;
    top: 50%;
    width: 100%;
    display: flex;
    justify-content: space-between;
    transform: translateY(-50%);
    padding: 0 20px;
}

.carousel-control {
    background: rgba(255, 255, 255, 0.2);
    color: var(--white);
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    font-size: 1.5rem;
    cursor: pointer;
    transition: var(--transition);
}

.carousel-control:hover {
    background: var(--primary-color);
}

.carousel-indicators {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
}

.indicator {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: var(--transition);
}

.indicator.active {
    background: var(--white);
}

/* Sobre Nosotros */
.about {
    padding: 100px 0;
    background: var(--light-color);
}

.about-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    align-items: center;
}

.about-image {
    border-radius: 10px;
    overflow: hidden;
    box-shadow: var(--box-shadow);
}

.about-text h3 {
    font-size: 1.8rem;
    margin-bottom: 20px;
    color: var(--dark-color);
}

.about-text p {
    margin-bottom: 20px;
}

.about-text ul li {
    margin-bottom: 10px;
    display: flex;
    align-items: center;
}

.about-text ul li i {
    color: var(--secondary-color);
    margin-right: 10px;
}

/* Servicios */
.services {
    padding: 100px 0;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.service-card {
    background: var(--white);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: var(--box-shadow);
    transition: var(--transition);
}

.service-card:hover {
    transform: translateY(-10px);
}

.service-image {
    height: 200px;
    overflow: hidden;
}

.service-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

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

.service-content {
    padding: 20px;
}

.service-content h3 {
    color: var(--primary-color);
    margin-bottom: 15px;
}

.service-content p {
    margin-bottom: 15px;
}

.service-content ul {
    margin-top: 15px;
}

.service-content ul li {
    margin-bottom: 8px;
    position: relative;
    padding-left: 20px;
}

.service-content ul li::before {
    content: "•";
    color: var(--primary-color);
    font-weight: bold;
    position: absolute;
    left: 0;
}

/* Galería */
.gallery, .video-gallery {
    padding: 100px 0;
    background: var(--light-color);
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}

.gallery-item {
    position: relative;
    border-radius: 10px;
    overflow: hidden;
    cursor: pointer;
    height: 250px;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.gallery-item:hover img {
    transform: scale(1.1);
}

.gallery-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 20px;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.8));
    color: var(--white);
    opacity: 0;
    transition: var(--transition);
}

.gallery-item:hover .gallery-overlay {
    opacity: 1;
}

/* Testimonios */
.testimonials {
    padding: 100px 0;
}

.testimonials-slider {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
}

.testimonial {
    display: none;
    background: var(--white);
    border-radius: 10px;
    padding: 30px;
    box-shadow: var(--box-shadow);
}

.testimonial.active {
    display: block;
    animation: fadeIn 1s;
}

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

.testimonial-content {
    display: flex;
    align-items: center;
    gap: 30px;
}

.testimonial-image {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
}

.testimonial-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.testimonial-text p {
    font-style: italic;
    margin-bottom: 15px;
    position: relative;
}

.testimonial-text p::before,
.testimonial-text p::after {
    content: '"';
    font-size: 2rem;
    color: var(--primary-color);
}

.testimonial-text h4 {
    color: var(--primary-color);
    margin-bottom: 5px;
}

.testimonial-text span {
    color: var(--gray);
    font-size: 0.9rem;
}

.testimonial-controls {
    position: absolute;
    top: 50%;
    width: 100%;
    display: flex;
    justify-content: space-between;
    transform: translateY(-50%);
}

.testimonial-prev,
.testimonial-next {
    background: var(--primary-color);
    color: var(--white);
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    transition: var(--transition);
}

.testimonial-prev:hover,
.testimonial-next:hover {
    background: #1565c0;
}

/* Contacto */
.contact {
    padding: 100px 0;
    background: var(--light-color);
}

.contact-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
}

.contact-info h3 {
    margin-bottom: 20px;
    color: var(--primary-color);
}

.contact-details {
    margin-top: 30px;
}

.contact-item {
    display: flex;
    align-items: flex-start;
    margin-bottom: 20px;
}

.contact-item i {
    font-size: 1.2rem;
    color: var(--primary-color);
    margin-right: 15px;
    margin-top: 5px;
}

.contact-item h4 {
    margin-bottom: 5px;
}

.contact-form {
    background: var(--white);
    padding: 30px;
    border-radius: 10px;
    box-shadow: var(--box-shadow);
}

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

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid var(--light-gray);
    border-radius: 5px;
    font-family: 'Open Sans', sans-serif;
    transition: var(--transition);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    border-color: var(--primary-color);
    outline: none;
}

.captcha label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
}

/* Footer */
footer {
    background: var(--dark-color);
    color: var(--white);
    padding: 70px 0 20px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    margin-bottom: 50px;
}

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

.footer-section h3 span {
    color: var(--primary-color);
}

.footer-section p {
    margin-bottom: 20px;
}

.footer-section ul li {
    margin-bottom: 10px;
}

.footer-section ul li a {
    color: var(--light-gray);
    transition: var(--transition);
}

.footer-section ul li a:hover {
    color: var(--primary-color);
    padding-left: 5px;
}

.social-links {
    display: flex;
    gap: 15px;
    margin-top: 20px;
}

.social-links a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.1);
    color: var(--white);
    border-radius: 50%;
    transition: var(--transition);
}

.social-links a:hover {
    background: var(--primary-color);
    transform: translateY(-3px);
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 1100;
    overflow: auto;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.modal.show {
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 1;
}

.modal-content {
    position: relative;
    max-width: 90%;
    max-height: 90%;
    background: var(--white);
    border-radius: 10px;
    overflow: hidden;
    animation: zoom 0.3s;
}

@keyframes zoom {
    from { transform: scale(0.9); }
    to { transform: scale(1); }
}

.close-modal {
    position: absolute;
    top: 15px;
    right: 15px;
    color: var(--white);
    font-size: 2rem;
    cursor: pointer;
    z-index: 10;
    transition: var(--transition);
}

.close-modal:hover {
    color: var(--primary-color);
}

.modal-body {
    position: relative;
}

.modal-body img {
    display: block;
    width: 100%;
    max-height: 80vh;
    object-fit: contain;
}

.modal-body video {
    display: block;
    width: 100%;
    max-height: 80vh;
}

/* Responsive */
@media (max-width: 992px) {
    .section-title {
        font-size: 2rem;
    }
    
    .carousel-content h1 {
        font-size: 2.5rem;
    }
    
    .about-content,
    .contact-content {
        grid-template-columns: 1fr;
    }
    
    .testimonial-content {
        flex-direction: column;
        text-align: center;
    }
}

@media (max-width: 768px) {
    .menu-toggle {
        display: flex;
    }
    
    .nav-menu {
        position: fixed;
        top: 70px;
        left: -100%;
        width: 100%;
        height: calc(100vh - 70px);
        background: var(--white);
        flex-direction: column;
        align-items: center;
        justify-content: center;
        transition: var(--transition);
        z-index: 999;
    }
    
    .nav-menu.active {
        left: 0;
    }
    
    .nav-menu li {
        margin: 15px 0;
    }
    
    .carousel-content h1 {
        font-size: 2rem;
    }
    
    .carousel-content p {
        font-size: 1rem;
    }
    
    .services-grid {
        grid-template-columns: 1fr;
    }
    
    .gallery-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 576px) {
    .carousel-content h1 {
        font-size: 1.8rem;
    }
    
    .btn {
        padding: 10px 20px;
    }
    
    .testimonial {
        padding: 20px;
    }
    
    .contact-form {
        padding: 20px;
    }
}
