:root {
    --primary-color: #0037B7;
    --secondary-color: #f5f5f5;
    --text-color: #333;
    --white: #fff;
}

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

body {
    font-family: 'Raleway', sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    font-weight: 400;
}

/* Header and Navigation */
header {
    background-color: var(--white);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
}

nav {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo a {
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.logo span:first-child {
    color: var(--primary-color);
    font-size: 3rem;
    font-family: 'Raleway', sans-serif;
    font-weight: 500;
}

.logo .subtitle {
    font-size: 1.4rem;
    color: var(--text-color);
    font-weight: normal;
    font-family: 'Pecita', cursive;
    padding-top: 1rem;
    transform: translateY(0.5rem);
}

.tooth-icon {
    width: 32px;
    height: auto;
    margin-left: 0.5rem;
}

.nav-links a {
    color: var(--text-color);
    text-decoration: none;
    margin-left: 2rem;
    font-weight: 500;
    transition: color 0.3s ease;
}

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

/* Hero Section */
.hero {
    margin-top: 80px;
    padding: 4rem 0;
    background-color: var(--secondary-color);
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-container {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 2rem;
    max-width: 1800px;
    margin: 0 auto;
    padding: 0 2rem;
}

.hero-content {
    flex: 0 1 35%;
    max-width: 900px;
    padding-top: 2rem;
}

.hero-content h2 {
    color: var(--primary-color);
    font-size: 2.5rem;
    margin-bottom: 1rem;
    font-weight: 500;
}

.hero-image {
    flex: 0 1 65%;
}

.hero-image img {
    width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

/* About Section */
.about {
    padding: 4rem 2rem;
    background-color: var(--white);
    position: relative;
}

.about h2 {
    color: var(--primary-color);
    text-align: center;
    font-weight: 500;
    font-size: 3rem;
    margin-bottom: 2rem;
}

.about-content {
    display: flex;
    align-items: center;
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.about p {
    color: var(--text-color);
    flex: 1;
    line-height: 1.8;
    font-weight: 400;
}

.about-image {
    max-width: 400px;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

/* Services Section */
.services {
    padding: 4rem 2rem;
    background-color: var(--secondary-color);
}

.services h2 {
    color: var(--primary-color);
    text-align: center;
    margin-bottom: 2rem;
    font-weight: 500;
    font-size: 3rem;
}

.services-list {
    max-width: 800px;
    margin: 0 auto;
    list-style: none;
}

.services-list li {
    padding: 1rem;
    margin-bottom: 1rem;
    background-color: var(--white);
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    font-weight: 400;
}

/* Contact Section */
.contact {
    padding: 4rem 2rem;
    background-color: var(--white);
}

.contact h2 {
    color: var(--primary-color);
    text-align: center;
    margin-bottom: 2rem;
    font-weight: 500;
    font-size: 3rem;
}

.contact-container {
    display: flex;
    justify-content: space-between;
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.contact-info {
    flex: 1;
}

.contact-info h3 {
    color: var(--primary-color);
    margin-bottom: 1rem;
    font-weight: 500;
}

.phone {
    margin: 1rem 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.phone-icon {
    width: 24px;
    height: auto;
}

.phone a {
    color: var(--primary-color);
    font-size: 1.5rem;
    text-decoration: none;
    font-weight: 500;
}

.address {
    margin-top: 1rem;
    font-weight: 400;
}

.map {
    flex: 1;
    min-height: 450px;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.map iframe {
    width: 100%;
    height: 100%;
    border: none;
}

/* Footer */
footer {
    background-color: var(--primary-color);
    color: var(--white);
    text-align: center;
    padding: 1rem;
    margin-top: 2rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    .hero {
        margin-top: 80px;
        padding-top: 100px;
        padding-bottom: 2rem;
    }

    .hero-container {
        flex-direction: column;
        gap: 2rem;
        padding: 0 1rem;
    }

    .hero-content {
        flex: 0 1 auto;
        text-align: center;
        max-width: 100%;
        padding: 0 1rem;
        margin-top: -40px;
    }

    .hero-content h2 {
        font-size: 2rem;
        margin-bottom: 1rem;
        display: block;
    }

    .hero-content p {
        font-size: 1rem;
        margin: 0 auto;
        max-width: 100%;
    }

    .hero-image {
        flex: 0 1 auto;
        width: 100%;
    }

    .about {
        padding: 2rem 1rem;
    }

    .about h2 {
        font-size: 2.5rem;
        margin-bottom: 1.5rem;
        position: static;
    }

    .about-content {
        flex-direction: column;
        text-align: center;
        gap: 1.5rem;
    }

    .about-image {
        order: -1; /* This moves the image to the top */
        max-width: 100%;
        width: 100%;
        height: auto;
    }

    .about p {
        margin: 0 auto;
        max-width: 100%;
        padding: 0 1rem;
    }

    .carousel {
        height: 300px;
    }
}

@media (max-width: 480px) {
    .hero {
        padding-top: 90px;
    }

    .hero-content {
        margin-top: -30px;
    }

    .hero-content h2 {
        font-size: 1.8rem;
    }

    .hero-content p {
        font-size: 0.95rem;
    }

    .about h2 {
        font-size: 2.2rem;
    }

    .carousel {
        height: 250px;
    }
}

.carousel {
    position: relative;
    width: 100%;
    overflow: hidden;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    max-height: 400px;
    aspect-ratio: 4/3;
}

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

.carousel-inner img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    transition: opacity 0.5s ease-in-out;
}

.carousel-inner img.active {
    opacity: 1;
}

.carousel-button {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.7);
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 20px;
    color: var(--primary-color);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.3s;
}

.carousel-button:hover {
    background: rgba(255, 255, 255, 0.9);
}

.carousel-button.prev {
    left: 10px;
}

.carousel-button.next {
    right: 10px;
}

.carousel-dots {
    position: absolute;
    bottom: 15px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
}

.dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: background-color 0.3s;
}

.dot.active {
    background: var(--primary-color);
}

@media (max-width: 500px) {
    .carousel-inner {
        max-height: 1000px;
    }
}

@media (max-width: 500px) {
    .carousel {
        max-height: 600px;
    }

    .hero-container {
        flex-direction: column;
        gap: 2rem;
    }

    .hero-content {
        flex: 0 1 auto;
        text-align: center;
        max-width: 500px;
        padding-top: 0;
    }

    .hero-image {
        flex: 0 1 auto;
        width: 100%;
        max-width: 500px;
    }
}

@media (max-width: 1200px) {
    .hero-container {
        flex-direction: column;
        gap: 2rem;
    }

    .hero-content {
        flex: 0 1 auto;
        text-align: center;
        max-width: 1000px;
        padding-top: 0;
    }

    .hero-image {
        flex: 0 1 auto;
        width: 100%;
        max-width: 1400px;
    }
}
