/* Shared layout fixes for the static Sundharam Dental site */

:root {
    --primary-color: #c29b4a;
    --secondary-color: #f4d699;
    --text-dark: #2c2b28;
    --text-light: #f2ece0;
    --bg-cream: #f5f0e8;
    --dark-bg: #1e1d22;
}

* { box-sizing: border-box; }

body {
    overflow-x: hidden;
}

img {
    max-width: 100%;
}

/* Header: logo stays centered, menus stay on one line */
@media (min-width: 993px) {
    .header-inner {
        display: grid;
        grid-template-columns: 1fr auto 1fr;
        align-items: center;
        gap: 1rem;
        max-width: 1240px;
        margin: 0 auto;
        padding: 0.85rem 1.25rem;
        flex-wrap: nowrap;
    }

    .header-inner > .nav-menu {
        display: flex;
        align-items: center;
        gap: 1.15rem;
        margin: 0;
        padding: 0;
    }

    .header-inner > .nav-menu:first-of-type {
        justify-content: flex-end;
    }

    .header-inner > .nav-menu:nth-of-type(2) {
        justify-content: flex-start;
    }

    .nav-menu a {
        white-space: nowrap;
        letter-spacing: 0.6px;
        font-size: 0.78rem;
    }

    .mobile-menu-btn {
        display: none !important;
    }
}

.logo-area {
    justify-self: center;
    line-height: 0;
}

.logo-area img {
    width: 92px;
    height: 92px;
    border-radius: 50%;
    object-fit: cover;
    object-position: center;
    border: 3px solid rgba(244, 214, 153, 0.85);
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.28);
}

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

/* Hero must have a real height or the slider collapses */
.hero-slider .swiper,
.hero-slider .hero-slide {
    height: 600px;
    min-height: 600px;
}

.hero-slider .swiper-slide {
    display: flex;
    align-items: center;
}

.hero-content {
    width: min(650px, 92%);
}

/* Equal photo frames */
.services-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    align-items: stretch;
}

.service-box {
    height: 340px;
    background-position: center center;
    background-size: cover;
}

.services-row .service-box-content {
    top: auto;
    bottom: 0;
    left: 0;
    right: 0;
    transform: none;
    width: 100%;
    min-height: 168px;
    padding: 3.2rem 1.4rem 1.4rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
    background: linear-gradient(to top, rgba(8, 14, 28, 0.9) 0%, rgba(8, 14, 28, 0.45) 62%, transparent 100%);
}

.services-row .service-box h3 {
    min-height: 2.2rem;
}

.services-row .service-box p {
    min-height: 3.2em;
    margin-bottom: 0.9rem;
}

.services-grid {
    align-items: stretch;
}

.service-card {
    height: 100%;
}

.service-card img,
.spec-card img {
    width: 100%;
    height: 210px;
    object-fit: cover;
    object-position: center;
}

a.spec-card {
    display: flex;
    flex-direction: column;
    height: 100%;
    text-decoration: none;
    color: inherit;
}

.spec-card-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
}

.spec-card h4 {
    min-height: 2.8em;
}

.spec-more {
    display: inline-block;
    margin-top: 0.6rem;
    color: #8a6a24;
    font-family: 'Montserrat', sans-serif;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.8px;
    text-transform: uppercase;
}

a.spec-card:hover {
    transform: translateY(-6px);
}

a.spec-card:hover .spec-more {
    color: #6d5214;
}

.spec-card h4 a,
.service-card h4 a {
    color: inherit;
    text-decoration: none;
}

.spec-card h4 a:hover,
.service-card h4 a:hover {
    color: var(--primary-color);
}

.team-section .team-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: stretch;
    gap: 2rem;
}

.team-section .team-member {
    flex: 0 1 300px;
    max-width: 320px;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.team-section .team-member img {
    width: 168px;
    height: 168px;
    object-fit: cover;
    object-position: center 28%;
    flex-shrink: 0;
}

.team-section .swiper-pagination {
    display: none;
}

.doctor-img,
.about-img {
    background: #efe8dc;
    border-radius: 16px;
    overflow: hidden;
    aspect-ratio: 5 / 6;
}

.doctor-img img,
.about-img img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    object-position: center 18%;
    border-radius: 16px;
}

.overview-image {
    background-position: left center !important;
    background-size: cover !important;
    min-height: 520px;
}

.wecare-section::before {
    background-position: center center !important;
    background-size: cover !important;
}

.page-title-section,
.covid-section,
.wecare-section {
    border-left: none !important;
    border-right: none !important;
    border-top: none !important;
}

.page-title-section {
    text-align: center;
    border-bottom: 4px solid #f2ece0 !important;
}

.page-title-section .container {
    text-align: center;
}

.map-area {
    min-height: 100%;
    background: #111;
}

.map-area iframe {
    display: block;
    width: 100%;
    height: 100%;
    min-height: 520px;
    border: 0;
}

.newsletter-form {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.newsletter-form input[type="email"] {
    padding: 14px 22px;
    border-radius: 50px;
    border: none;
    width: min(360px, 100%);
    font-family: inherit;
}

.footer-col li {
    line-height: 1.55;
}

/* Service detail pages */
.service-detail {
    padding: 4rem 0 5rem;
}

.service-detail-grid {
    display: grid;
    grid-template-columns: 0.9fr 1.1fr;
    gap: 0;
    align-items: stretch;
    background: #fff;
    border-radius: 18px;
    overflow: hidden;
    box-shadow: 0 10px 32px rgba(44, 43, 40, 0.08);
}

.service-detail-photo {
    position: relative;
    background: #efe8dc;
    min-height: 480px;
}

.service-detail-photo img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    min-height: 0;
    object-fit: cover;
    object-position: center;
    display: block;
}

.service-detail-copy {
    padding: 2.4rem 2.2rem;
}

.service-detail h2 {
    font-family: 'Montserrat', sans-serif;
    font-size: 2rem;
    margin-bottom: 0.75rem;
}

.service-detail h2::after {
    content: '';
    display: block;
    width: 70px;
    height: 3px;
    background: var(--primary-color);
    margin-top: 0.8rem;
}

.service-detail p {
    color: #555;
    line-height: 1.8;
    margin-bottom: 1rem;
}

.detail-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
    margin-top: 1.5rem;
}

.btn-gold {
    display: inline-block;
    padding: 12px 28px;
    border-radius: 50px;
    border: 2px solid var(--primary-color);
    color: var(--text-dark);
    background: var(--secondary-color);
    text-decoration: none;
    font-family: 'Montserrat', sans-serif;
    font-weight: 600;
    font-size: 0.82rem;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.btn-outline {
    display: inline-block;
    padding: 12px 28px;
    border-radius: 50px;
    border: 2px solid var(--primary-color);
    color: var(--text-dark);
    background: transparent;
    text-decoration: none;
    font-family: 'Montserrat', sans-serif;
    font-weight: 600;
    font-size: 0.82rem;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.related-services {
    margin-top: 3.2rem;
}

.related-services h3 {
    font-family: 'Montserrat', sans-serif;
    font-size: 1.6rem;
    text-align: center;
    margin-bottom: 0.4rem;
}

.related-note {
    text-align: center;
    color: #666;
    margin-bottom: 1.4rem;
}

.related-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem;
}

.related-card {
    display: flex;
    flex-direction: column;
    width: calc(25% - 0.75rem);
    max-width: 280px;
    background: #fff;
    border-radius: 14px;
    overflow: hidden;
    text-decoration: none;
    color: var(--text-dark);
    border: 2px solid #efe6d4;
    box-shadow: 0 8px 18px rgba(44, 43, 40, 0.06);
    transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.related-card img {
    width: 100%;
    height: 132px;
    object-fit: cover;
    object-position: center;
}

.related-card-title {
    font-family: 'Montserrat', sans-serif;
    font-weight: 600;
    font-size: 0.95rem;
    line-height: 1.35;
    padding: 0.85rem 0.9rem 0.15rem;
    min-height: 3.4em;
}

.related-card-go {
    margin-top: auto;
    padding: 0.35rem 0.9rem 0.9rem;
    color: #8a6a24;
    font-family: 'Montserrat', sans-serif;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.6px;
    text-transform: uppercase;
}

.related-card:hover {
    transform: translateY(-5px);
    border-color: var(--primary-color);
    box-shadow: 0 14px 28px rgba(194, 155, 74, 0.28);
}

.related-card:hover .related-card-go {
    color: #5c4510;
}

/* Standalone page pieces used by service pages */
.top-header {
    background: linear-gradient(rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0.6)), url('/wp-content/uploads/2017/09/header.png') center/cover;
    border-bottom: 5px solid #f2ece0;
    position: relative;
    z-index: 1000;
}

.nav-menu {
    list-style: none;
    font-family: 'Montserrat', sans-serif;
    font-weight: 600;
}

.nav-menu a {
    color: var(--text-light);
    text-decoration: none;
    text-transform: uppercase;
}

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

.mobile-menu-btn,
.mobile-menu-close {
    background: none;
    border: none;
    color: var(--text-light);
    cursor: pointer;
}

.mobile-menu-btn { font-size: 28px; }

.mobile-menu {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.95);
    z-index: 9999;
    padding: 2rem;
}

.mobile-menu.active {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.mobile-menu ul { list-style: none; text-align: center; padding: 0; }
.mobile-menu li { margin: 1.2rem 0; }
.mobile-menu a {
    color: #fff;
    text-decoration: none;
    font-family: 'Montserrat', sans-serif;
    font-size: 1.35rem;
    font-weight: 600;
}
.mobile-menu-close {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    color: #fff;
    font-size: 2rem;
}

.page-title-section {
    background: linear-gradient(rgba(0, 0, 0, 0.65), rgba(0, 0, 0, 0.65)), url('/wp-content/uploads/2017/09/center.png') center/cover;
    padding: 3.5rem 0;
    color: var(--text-light);
}

.page-title {
    font-family: 'Montserrat', sans-serif;
    font-size: clamp(2rem, 4vw, 2.6rem);
    margin-bottom: 0.4rem;
}

.breadcrumbs, .breadcrumbs a { color: var(--text-light); text-decoration: none; font-size: 0.95rem; }
.breadcrumbs a:hover { color: var(--primary-color); }

.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }

.footer-section {
    background: var(--dark-bg) url('/wp-content/uploads/2017/09/footer.png') repeat top left;
    color: #fff;
    padding: 3.5rem 0 0;
}

.newsletter-section { text-align: center; margin-bottom: 2.5rem; }
.newsletter-section h2 { font-family: 'Montserrat', sans-serif; font-size: 2rem; margin-bottom: 0.4rem; }
.newsletter-section h6, .newsletter-section p.sub { color: #aaa; font-weight: 400; margin-bottom: 1.2rem; }

.footer-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
    text-align: left;
    padding-bottom: 2rem;
}

.footer-col h4 {
    font-family: 'Montserrat', sans-serif;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.footer-col ul { list-style: none; padding: 0; margin: 0; }
.footer-col a { color: #ccc; text-decoration: none; }
.footer-col a:hover { color: var(--secondary-color); }

.footer-bottom {
    background: #0f0f0f;
    text-align: center;
    padding: 1.2rem;
    color: #888;
    font-size: 0.85rem;
}

.footer-bottom,
.footer-bottom p {
    color: #ffffff;
}

.footer-bottom a,
.footer-bottom a:link,
.footer-bottom a:visited,
.footer-bottom a:hover,
.footer-bottom a:active {
    color: #ffffff !important;
    text-decoration: none;
}

@media (max-width: 992px) {
    .header-inner {
        display: flex !important;
        align-items: center;
        justify-content: space-between;
        padding: 0.8rem 1rem;
        flex-wrap: nowrap;
    }

    .nav-menu { display: none !important; }

    .mobile-menu-btn { display: block !important; }

    .logo-area img { width: 68px; height: 68px; }

    .services-row,
    .service-detail-grid,
    .related-grid,
    .footer-grid,
    .doctor-grid,
    .about-grid,
    .contact-section,
    .contact-form-section,
    .service-overview {
        grid-template-columns: 1fr !important;
    }

    .hero-slider .swiper,
    .hero-slider .hero-slide {
        height: 460px;
        min-height: 460px;
    }

    .service-detail-copy { padding: 1.6rem; }
    .service-detail-photo { min-height: 280px; }
    .related-card { width: calc(50% - 0.5rem); }
    .doctor-img, .about-img { aspect-ratio: 4 / 3; max-width: 460px; margin: 0 auto; }

    .contact-form-area,
    .overview-content { padding: 2.5rem 1.4rem !important; }
}

@media (max-width: 640px) {
    .hero-content { text-align: center; padding-left: 1.2rem; padding-right: 1.2rem; }
    .hero-content .divider { margin-left: auto; margin-right: auto; }
    .form-row { grid-template-columns: 1fr !important; }
    .footer-grid { text-align: center; }
    .stats-grid { grid-template-columns: 1fr !important; }
}
