/* Carley Family Dental - Enhanced Styles */

/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-font-smoothing: antialiased;
}

:root {
    --primary: #1e88e5;       /* Dental blue */
    --primary-dark: #0d47a1;  /* Darker blue */
    --primary-light: #bbdefb; /* Light blue */
    --accent: #26a69a;        /* Teal accent */
    --text-dark: #263238;     /* Near black */
    --text-medium: #546e7a;   /* Medium gray */
    --text-light: #78909c;    /* Light gray */
    --background: #ffffff;
    --service-card: #fff;    /* White */
    --background-alt: #f5f9ff; /* Light blue background */
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.08);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.12);
    --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.15);
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 16px;
    --transition: all 0.3s ease;
    --max-width: 1200px;
}

body {
    font-family: 'SF Pro Text', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    background-color: var(--background);
    letter-spacing: -0.01em;
    padding-top: 60px;
    overflow-x: hidden;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1rem;
    color: var(--text-dark);
}

h1 {
    font-size: clamp(2.5rem, 5vw, 4rem);
}

h2 {
    font-size: clamp(2rem, 4vw, 3rem);
}

h3 {
    font-size: clamp(1.5rem, 3vw, 2rem);
}

p {
    margin-bottom: 1.5rem;
    color: var(--text-medium);
}

/* Container */
.container {
    width: 100%;
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 2rem;
}

/* Navigation */
.nav-container {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 2rem;
    height: 60px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: saturate(180%) blur(20px);
    z-index: 1000;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

.nav-container.scrolled {
    height: 60px;
    box-shadow: var(--shadow-md);
}

.logo img {
    max-width: 180px;
    height: auto;
    transition: var(--transition);
}

.nav-container.scrolled .logo img {
    max-width: 180px;
}

.menu-toggle {
    display: none;
    flex-direction: column;
    gap: 6px;
    cursor: pointer;
    padding: 10px;
    z-index: 1001;
}

.bar1, .bar2 {
    width: 24px;
    height: 2px;
    background: var(--text-dark);
    transition: var(--transition);
}

.menu-active .bar1 {
    transform: rotate(45deg) translate(4px, 4px);
}

.menu-active .bar2 {
    transform: rotate(-45deg) translate(4px, -4px);
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2.5rem;
}

.nav-menu a {
    text-decoration: none;
    color: var(--text-medium);
    font-weight: 500;
    font-size: 1rem;
    letter-spacing: -0.01em;
    transition: var(--transition);
    padding: 0.5rem 0;
    position: relative;
}

.nav-menu a:hover,
.nav-menu a.active {
    color: var(--primary);
}

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

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

.nav-menu a i {
    margin-right: 0.5rem;
    font-size: 1.1rem;
}

/* Hero Section */
.hero {
    position: relative;
    min-height: 600px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: var(--background);
    background-size: 110% 110%;
    background-position: center;
    background-repeat: no-repeat;
    padding: 4rem 2rem;
    margin-bottom: 4rem;
    overflow: hidden;
    transition: background-size 0.3s ease;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to right, rgba(13, 71, 161, 0.8), rgba(30, 136, 229, 0.6));
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 800px;
    animation: fadeInUp 1s ease-out;
}

.hero-content h1 {
    font-size: clamp(2.5rem, 5vw, 4rem);
    margin-bottom: 1.5rem;
    font-weight: 800;
    color: var(--background);
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.hero-content p {
    font-size: clamp(1.2rem, 2vw, 1.6rem);
    margin-bottom: 2.5rem;
    opacity: 0.95;
    color: var(--background);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

/* CTA Buttons */
.cta-button,
.secondary-cta {
    display: inline-block;
    padding: 1rem 2.5rem;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    font-size: 1.1rem;
    letter-spacing: 0.01em;
    transition: var(--transition);
    box-shadow: var(--shadow-md);
}

.cta-button {
    background: var(--primary);
    color: var(--background);
    border: 2px solid var(--primary);
}

.cta-button:hover {
    background: var(--primary-dark);
    border-color: var(--primary-dark);
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
}

.secondary-cta {
    background: var(--background);
    color: var(--primary);
    border: 2px solid var(--primary);
    margin-left: 1rem;
}

.secondary-cta:hover {
    background: var(--primary-light);
    color: var(--primary-dark);
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
}

/* Features Section */
.features {
    padding: 6rem 2rem;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 3rem;
    max-width: var(--max-width);
    margin: 0 auto;
}

.feature-card {
    text-align: center;
    padding: 3rem 2rem;
    border-radius: var(--radius-lg);
    background: var(--background);
    box-shadow: var(--shadow-md);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.feature-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 5px;
    background: var(--primary);
    z-index: -1;
    transition: var(--transition);
}

.feature-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-lg);
}

.feature-card:hover::before {
    height: 10px;
}

.feature-card img {
    width: 220px;
    height: 220px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 2rem;
    border: 5px solid var(--primary-light);
    box-shadow: var(--shadow-md);
    transition: var(--transition);
}

.feature-card:hover img {
    transform: scale(1.05);
    border-color: var(--primary);
}

.feature-card h3 {
    font-size: 1.8rem;
    margin-bottom: 1rem;
    color: var(--text-dark);
}

.feature-card p {
    color: var(--text-medium);
    line-height: 1.7;
    font-size: 1.1rem;
}

/* Location Section */
.location {
    padding: 6rem 2rem;
    background: var(--background-alt);
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.location-content {
    max-width: 500px;
    justify-self: end;
    animation: fadeInLeft 1s ease-out;
}

.location-content h2 {
    font-size: 2.8rem;
    margin-bottom: 1.5rem;
    color: var(--text-dark);
    position: relative;
    padding-bottom: 1rem;
}

.location-content h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 80px;
    height: 4px;
    background: var(--primary);
    border-radius: 2px;
}

.location-content p {
    font-size: 1.2rem;
    margin-bottom: 2.5rem;
    color: var(--text-medium);
    line-height: 1.8;
}

.location-image {
    animation: fadeInRight 1s ease-out;
}

.location-image img {
    width: 100%;
    max-width: 600px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    transition: var(--transition);
}

.location-image img:hover {
    transform: scale(1.02);
}

/* Services Grid */
.services-grid {
    padding: 6rem 2rem;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2rem;
    max-width: var(--max-width);
    margin: 0 auto;
    position: relative;
}

.service-card {
    padding: 3rem 2rem;
    border-radius: var(--radius-lg);
    background: var(--service-card);
    box-shadow: var(--shadow-md);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 0;
    background: linear-gradient(to bottom, var(--primary-light) 0%, transparent 100%);
    opacity: 0.2;
    z-index: -1;
    transition: var(--transition);
}

.service-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-lg);
}

.service-card:hover::before {
    height: 100%;
}

.service-card i {
    color: var(--primary);
    margin-bottom: 1.5rem;
    font-size: 2rem;
    transition: var(--transition);
    display: inline-block;
    width: 40px;
    height: 40px;
    line-height: 40px;
    text-align: center;
    border-radius: 10%;
    background-color: var(--primary-light);
}

.service-card:hover i {
    transform: scale(1.2);
    color: var(--primary-dark);
}

.service-card h3 {
    font-size: 1.8rem;
    margin-bottom: 1.2rem;
    color: var(--text-dark);
    padding-bottom: 0.8rem;
    border-bottom: 1px solid var(--primary-light);
}

.service-card p {
    color: var(--text-medium);
    margin-bottom: 2rem;
    font-size: 1.1rem;
}

.service-card ul {
    list-style: none;
    margin-top: 1.5rem;
    border-top: 2px solid var(--primary-light);
    padding-top: 1.5rem;
}

.service-card ul li {
    margin-bottom: 0.8rem;
    color: var(--text-medium);
    font-size: 1.05rem;
    display: flex;
    align-items: flex-start;
    padding-bottom: 0.8rem;
    border-bottom: 1px solid var(--primary-light);
}

.service-card ul li i {
    color: var(--primary);
    margin-right: 0.8rem;
    font-size: 1.2rem;
    min-width: 1.5rem;
    text-align: center;
    margin-top: 0.2rem;
}

/* Testimonials */
.testimonials {
    padding: 6rem 2rem;
    background: var(--background-alt);
    text-align: center;
}

.testimonials h2 {
    font-size: 2.8rem;
    margin-bottom: 1.5rem;
    color: var(--text-dark);
    position: relative;
    display: inline-block;
    padding-bottom: 1rem;
}

.testimonials h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: var(--primary);
    border-radius: 2px;
}

.testimonial-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 3rem;
    max-width: var(--max-width);
    margin: 4rem auto 0;
}

.testimonial-card {
    background: var(--background);
    padding: 3rem 2rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    transition: var(--transition);
    position: relative;
    text-align: left;
}

.testimonial-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.testimonial-card i {
    color: var(--primary);
    font-size: 2rem;
    margin-bottom: 1.5rem;
    opacity: 0.8;
}

.testimonial-card p {
    font-style: italic;
    color: var(--text-medium);
    margin-bottom: 1.5rem;
    line-height: 1.8;
    font-size: 1.1rem;
}

.testimonial-card cite {
    color: var(--text-dark);
    font-style: normal;
    font-weight: 600;
    display: flex;
    align-items: center;
    font-size: 1.05rem;
}

.testimonial-card cite i {
    font-size: 1.2rem;
    margin-right: 0.8rem;
    margin-bottom: 0;
}

/* Practice Content */
.practice-content {
    padding: 6rem 2rem;
    max-width: var(--max-width);
    margin: 0 auto;
    text-align: center;
}

.practice-content h2 {
    font-size: 2.8rem;
    margin-bottom: 1.5rem;
    color: var(--text-dark);
    position: relative;
    display: inline-block;
    padding-bottom: 1rem;
}

.practice-content h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: var(--primary);
    border-radius: 2px;
}

.practice-content p {
    color: var(--text-medium);
    margin-bottom: 3rem;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
    font-size: 1.2rem;
    line-height: 1.8;
}

.practice-features {
    list-style: none;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin-bottom: 4rem;
}

.practice-features li {
    padding: 1.5rem;
    background: var(--background);
    border-radius: var(--radius-md);
    color: var(--text-medium);
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    font-size: 1.1rem;
    display: flex;
    align-items: center;
}

.practice-features li:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
    background: var(--primary-light);
    color: var(--primary-dark);
}

.practice-features li i {
    color: var(--primary);
    margin-right: 1rem;
    font-size: 1.5rem;
    transition: var(--transition);
}

.practice-features li:hover i {
    transform: scale(1.2);
    color: var(--primary-dark);
}

.practice-cta {
    margin-top: 3rem;
}

.cta-note {
    margin-top: 1.5rem;
    color: var(--text-light);
    font-size: 1rem;
}

/* Footer */
footer {
    background: linear-gradient(to right, var(--primary-dark), var(--primary));
    padding: 5rem 2rem 2rem;
    color: var(--background);
}

.footer-content {
    max-width: var(--max-width);
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 3rem;
}

.footer-info h3,
.footer-nav h3 {
    color: var(--background);
    margin-bottom: 1.5rem;
    font-size: 1.4rem;
    position: relative;
    padding-bottom: 0.8rem;
}

.footer-info h3::after,
.footer-nav h3::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 50px;
    height: 3px;
    background: var(--background);
    border-radius: 1.5px;
}

.footer-info p,
.footer-nav ul li a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    line-height: 1.8;
    font-size: 1.05rem;
    transition: var(--transition);
}

.footer-info p a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: var(--transition);
}

.footer-info p a:hover,
.footer-nav ul li a:hover {
    color: var(--background);
    text-decoration: underline;
}

.footer-nav ul {
    list-style: none;
}

.footer-nav ul li {
    margin-bottom: 0.8rem;
}

.footer-bottom {
    text-align: center;
    margin-top: 4rem;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.95rem;
}

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

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

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

/* About Page Specific Styles */
.about-hero {
    position: relative;
    height: 50vh;
    min-height: 400px;
    background: linear-gradient(to right, var(--primary-dark), var(--primary));
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: var(--background);
    padding: 2rem;
}

.about-hero-content {
    position: relative;
    z-index: 1;
    max-width: 800px;
    animation: fadeInUp 1s ease-out;
}

.about-hero-content h1 {
    font-size: clamp(2.5rem, 5vw, 4rem);
    margin-bottom: 1rem;
    font-weight: 800;
    color: var(--background);
}

.about-hero-content p {
    font-size: clamp(1.2rem, 2vw, 1.5rem);
    opacity: 0.95;
    color: var(--background);
}

/* Responsive Design */
@media (max-width: 992px) {
    .location {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .location-content {
        justify-self: center;
        max-width: 600px;
    }

    .location-content h2::after {
        left: 50%;
        transform: translateX(-50%);
    }
}

@media (max-width: 768px) {
    body {
        padding-top: 60px;
    }

    .nav-container {
        height: 60px;
        padding: 0 1.5rem;
        z-index: 999;
    }

    .menu-toggle {
        display: flex;
    }

    .nav-menu {
        position: fixed;
        top: 60px;
        left: 0;
        right: 0;
        flex-direction: column;
        background: rgba(255, 255, 255, 0.98);
        backdrop-filter: blur(10px);
        padding: 2rem;
        gap: 1.5rem;
        transform: translateY(-150%);
        transition: transform 0.3s ease-in-out;
        box-shadow: var(--shadow-md);
        z-index: 999;
    }

    .nav-menu.active {
        transform: translateY(0);
    }

    .nav-menu a {
        font-size: 1.1rem;
    }

    .nav-menu a::after {
        display: none;
    }

    .hero {
        height: 30vh;
    }

    .hero-content h1 {
        font-size: clamp(2rem, 4vw, 3rem);
    }

    .hero-content p {
        font-size: clamp(1.1rem, 1.5vw, 1.3rem);
    }

    .cta-button, .secondary-cta {
        padding: 0.9rem 2rem;
        font-size: 1rem;
        display: block;
        margin: 1rem auto;
        max-width: 250px;
    }

    .feature-card img {
        width: 180px;
        height: 180px;
    }

    .practice-features {
        grid-template-columns: 1fr;
    }

    .testimonial-grid, 
    .services-grid,
    .features {
        gap: 2rem;
    }

    .footer-content {
        gap: 2rem;
        text-align: center;
    }

    .footer-info h3::after,
    .footer-nav h3::after {
        left: 50%;
        transform: translateX(-50%);
    }
}

@media (max-width: 480px) {
    .hero {
        min-height: 400px;
    }

    .feature-card,
    .service-card,
    .testimonial-card {
        padding: 2rem 1.5rem;
    }

    h1 {
        font-size: clamp(2rem, 4vw, 2.5rem);
    }

    h2 {
        font-size: clamp(1.8rem, 3vw, 2.2rem);
    }

    .practice-features li {
        padding: 1.2rem;
        font-size: 1rem;
    }
}

/* Script-related styles */
.menu-toggle.active .bar1 {
    transform: rotate(45deg) translate(4px, 4px);
}

.menu-toggle.active .bar2 {
    transform: rotate(-45deg) translate(4px, -4px);
}

.nav-menu.active {
    transform: translateY(0);
}

.header-cta {
    background: var(--primary);
    color: var(--background) !important;
    padding: 0.5rem 1.2rem !important;
    border-radius: 50px;
    border: 2px solid var(--primary);
    transition: var(--transition);
    box-shadow: var(--shadow-sm);
}

.header-cta:hover {
    background: var(--primary-dark);
    border-color: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.header-cta::after {
    display: none;
}

.header-cta i {
    margin-right: 0.3rem;
}