/* Shared styles for drhaas.com (index.html, services.html) */

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

:root {
    --primary-color: #2c5282;
    --secondary-color: #4a90a4;
    --accent-color: #67b8a3;
    --text-dark: #2d3748;
    --text-light: #4a5568;
    --bg-light: #f7fafc;
    --white: #ffffff;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 120px; /* Adjust to match header height */
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    background-color: var(--white);
}

/* Header Styles */
header {
    background: var(--white);
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-top {
    background: var(--primary-color);
    color: var(--white);
    padding: 0.5rem 0;
    font-size: 0.9rem;
}

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

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

.contact-info {
    display: flex;
    gap: 2rem;
    align-items: center;
}

.contact-info a {
    color: var(--white);
    text-decoration: none;
    transition: opacity 0.3s;
}

.contact-info a:hover {
    opacity: 0.8;
}

nav {
    padding: 1.5rem 0;
    position: relative;
}

/* Mobile menu button (hidden on desktop) */
.menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 44px;
    height: 44px;
    padding: 10px;
    background: transparent;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    cursor: pointer;
}

.menu-toggle span {
    display: block;
    height: 2px;
    width: 100%;
    background: var(--primary-color);
    border-radius: 2px;
    transition: transform 0.3s, opacity 0.3s;
}

nav.menu-open .menu-toggle span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

nav.menu-open .menu-toggle span:nth-child(2) {
    opacity: 0;
}

nav.menu-open .menu-toggle span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

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

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
}

.logo a {
    color: inherit;
    text-decoration: none;
}

.logo span {
    font-weight: 400;
    color: var(--text-light);
    font-size: 0.9rem;
    display: block;
}

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

.nav-links a {
    color: var(--text-dark);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s;
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--secondary-color);
}

.btn-primary {
    background: var(--accent-color);
    color: var(--white);
    padding: 0.75rem 2rem;
    border-radius: 5px;
    text-decoration: none;
    font-weight: 600;
    display: inline-block;
    transition: all 0.3s;
    border: none;
    cursor: pointer;
    font-size: 1rem;
}

.btn-primary:hover {
    background: #5aa693;
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: var(--white);
    padding: 5rem 0 4rem 0;
}

.hero-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.hero h1 {
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
    line-height: 1.2;
}

.hero-text p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    opacity: 0.95;
}

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

.btn-secondary {
    background: transparent;
    color: var(--white);
    padding: 0.75rem 2rem;
    border: 2px solid var(--white);
    border-radius: 5px;
    text-decoration: none;
    font-weight: 600;
    display: inline-block;
    transition: all 0.3s;
}

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

.hero-image {
    position: relative;
}

.hero-photo {
    width: 100%;
    height: 400px;
    background: var(--white);
    border-radius: 10px;
    box-shadow: var(--shadow-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-light);
    text-align: center;
    padding: 2rem;
    font-size: 0.9rem;
    overflow: hidden;
}

.hero-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.credentials-overlay {
    position: absolute;
    bottom: -60px;
    left: 20px;
    right: 20px;
    background: var(--white);
    padding: 1.5rem;
    border-radius: 10px;
    box-shadow: var(--shadow-lg);
    color: var(--text-dark);
}

.credentials-list {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
    list-style: none;
}

.credentials-list li {
    display: flex;
    align-items: center;
    font-size: 0.9rem;
}

.credentials-list li:before {
    content: "\2713"; /* check mark, escaped to avoid encoding issues */
    color: var(--accent-color);
    font-weight: bold;
    margin-right: 0.5rem;
}

/* Services Section (home page overview) */
.services {
    padding: 5rem 0;
    background: var(--bg-light);
}

.section-header {
    text-align: center;
    margin-bottom: 3rem;
}

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

.section-header p {
    font-size: 1.2rem;
    color: var(--text-light);
    max-width: 600px;
    margin: 0 auto;
}

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

.service-card {
    background: var(--white);
    padding: 2rem;
    border-radius: 10px;
    box-shadow: var(--shadow);
    transition: all 0.3s;
    display: flex;
    flex-direction: column;
}

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

.service-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--secondary-color), var(--accent-color));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    flex-shrink: 0;
}

.service-card h3 {
    color: var(--primary-color);
    margin-bottom: 1rem;
    font-size: 1.3rem;
}

.service-card p {
    color: var(--text-light);
    line-height: 1.8;
}

.service-link {
    margin-top: auto;
    padding-top: 1rem;
    color: var(--secondary-color);
    font-weight: 600;
    text-decoration: none;
    transition: color 0.3s;
}

.service-link:hover {
    color: var(--primary-color);
}

.services-more {
    text-align: center;
    margin-top: 3rem;
}

/* Photo Gallery Section */
.gallery {
    padding: 5rem 0;
    background: var(--white);
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.gallery-item {
    position: relative;
    height: 250px;
    background: var(--bg-light);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: transform 0.3s;
}

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

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

/* About Section */
.about {
    padding: 5rem 0;
    background: var(--bg-light);
}

.about-content {
    display: grid;
    grid-template-columns: 1.2fr 2fr;
    gap: 3rem;
    align-items: start;
}

.about-image {
    grid-column: 1;
    grid-row: 1;
    position: sticky;
    top: 50px;
}

.doctor-photo {
    width: 100%;
    height: 500px;
    background: var(--white);
    border-radius: 5px;
    box-shadow: var(--shadow);
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 0;
    color: var(--text-light);
    font-size: 0.9rem;
    overflow: hidden;
}

.doctor-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.book-promo {
    background: linear-gradient(135deg, var(--secondary-color), var(--accent-color));
    color: var(--white);
    padding: 1.5rem;
    border-radius: 10px;
    grid-column: 1;
    grid-row: 2;
    margin-top: 2rem;
}

.book-promo h4 {
    margin-bottom: 0.5rem;
}

.book-promo p {
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.about-text {
    grid-column: 2;
    grid-row: 1 / 3;  /* Span both rows */
}

.about-text h3 {
    color: var(--primary-color);
    font-size: 2rem;
    margin-bottom: 1.5rem;
}

.about-text h4 {
    color: var(--primary-color);
    font-size: 1.3rem;
    margin-top: 2rem;
    margin-bottom: 1rem;
}

.about-text p {
    color: var(--text-light);
    margin-bottom: 1.5rem;
    line-height: 1.8;
}

.specialties {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-top: 2rem;
}

.specialty-tag {
    background: var(--white);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    color: var(--primary-color);
    font-weight: 500;
    border: 1px solid #e2e8f0;
}

/* CTA Section */
.cta {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: var(--white);
    padding: 4rem 0;
    text-align: center;
}

.cta h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.cta p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    opacity: 0.95;
}

.phone-large {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
}

/* Footer */
footer {
    background: var(--text-dark);
    color: var(--white);
    padding: 3rem 0 1rem;
}

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

.footer-section h4 {
    margin-bottom: 1rem;
}

.footer-section p, .footer-section ul {
    opacity: 0.9;
    line-height: 1.8;
}

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

.footer-section a {
    color: var(--white);
    text-decoration: none;
    transition: opacity 0.3s;
}

.footer-section a:hover {
    opacity: 0.7;
}

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

/* Reviews Carousel Section */
.reviews {
    padding: 5rem 0;
    background: var(--white);
}

.carousel-container {
    position: relative;
    max-width: 900px;
    margin: 0 auto;
    padding: 0 4rem;
}

.carousel-track {
    overflow: hidden;
    position: relative;
    min-height: 300px;
}

.review-card {
    display: none;
    text-align: center;
    padding: 3rem 2rem;
    background: var(--bg-light);
    border-radius: 10px;
    box-shadow: var(--shadow);
    animation: fadeIn 0.5s ease-in;
}

.review-card.active {
    display: block;
}

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

.stars {
    color: #fbbf24;
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
}

.review-text {
    font-size: 1.2rem;
    color: var(--text-dark);
    line-height: 1.8;
    margin-bottom: 2rem;
    font-style: italic;
}

.reviewer-name {
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 0.25rem;
}

.reviewer-info {
    color: var(--text-light);
    font-size: 0.9rem;
}

.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: var(--white);
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    font-size: 2rem;
    cursor: pointer;
    transition: all 0.3s;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

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

.carousel-btn.prev {
    left: 0;
}

.carousel-btn.next {
    right: 0;
}

.carousel-dots {
    display: flex;
    justify-content: center;
    gap: 0.75rem;
    margin-top: 2rem;
}

.dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #cbd5e0;
    cursor: pointer;
    transition: all 0.3s;
}

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

.dot:hover {
    background: var(--secondary-color);
}

.reviews-more {
    text-align: center;
    margin-top: 2rem;
}

.reviews-more a {
    color: var(--secondary-color);
    font-weight: 600;
    text-decoration: none;
}

.reviews-more a:hover {
    color: var(--primary-color);
}

/* ===== Services page ===== */
.page-hero {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: var(--white);
    padding: 4rem 0 3.5rem;
    text-align: center;
}

.page-hero h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    line-height: 1.2;
}

.page-hero p {
    font-size: 1.2rem;
    opacity: 0.95;
    max-width: 720px;
    margin: 0 auto 2rem;
}

.service-jump {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.75rem;
    list-style: none;
}

.service-jump a {
    display: inline-block;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.6);
    color: var(--white);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    transition: all 0.3s;
}

.service-jump a:hover {
    background: var(--white);
    color: var(--primary-color);
}

.service-detail {
    padding: 4.5rem 0;
    background: var(--white);
}

.service-detail.alt {
    background: var(--bg-light);
}

.service-detail-inner {
    display: grid;
    grid-template-columns: 80px 1fr;
    gap: 2rem;
    max-width: 900px;
    margin: 0 auto;
}

.service-detail .service-icon {
    width: 70px;
    height: 70px;
    font-size: 1.8rem;
    margin-bottom: 0;
}

.service-detail h2 {
    color: var(--primary-color);
    font-size: 2rem;
    margin-bottom: 1rem;
    line-height: 1.25;
}

.service-detail h3 {
    color: var(--primary-color);
    font-size: 1.2rem;
    margin: 1.75rem 0 0.75rem;
}

.service-detail p {
    color: var(--text-light);
    line-height: 1.8;
    margin-bottom: 1rem;
}

.check-list {
    list-style: none;
    margin-bottom: 1rem;
}

.check-list li {
    color: var(--text-light);
    line-height: 1.7;
    padding-left: 1.75rem;
    position: relative;
    margin-bottom: 0.5rem;
}

.check-list li:before {
    content: "\2713";
    color: var(--accent-color);
    font-weight: bold;
    position: absolute;
    left: 0;
}

.service-detail .btn-primary {
    margin-top: 1rem;
}

.crisis-note {
    background: var(--bg-light);
    padding: 1.5rem 0;
    text-align: center;
    color: var(--text-light);
    font-size: 0.95rem;
}

.crisis-note strong {
    color: var(--text-dark);
}

/* Tablet Responsive */
@media (min-width: 769px) and (max-width: 1024px) {
    .credentials-overlay {
        position: static;
        margin-top: 2rem;
    }

    .credentials-list {
        grid-template-columns: 1fr 1fr;  /* Keep 2 columns for tablets */
    }

    .doctor-photo {
        height: 500px;
    }
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .doctor-photo {
        height: 400px;
    }

    .menu-toggle {
        display: flex;
    }

    .nav-links {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        flex-direction: column;
        gap: 0;
        background: var(--white);
        box-shadow: var(--shadow-lg);
        border-top: 1px solid #e2e8f0;
        padding: 0.5rem 0;
    }

    nav.menu-open .nav-links {
        display: flex;
    }

    .nav-links a {
        display: block;
        padding: 0.85rem 1.5rem;
    }

    .hero-content {
        grid-template-columns: 1fr;
    }

    .about-content {
        grid-template-columns: 1fr;
        display: flex;
        flex-direction: column;
    }

    .about-image {
        position: static;
        order: 1;
    }

    .about-text {
        order: 2;
    }

    .book-promo {
        order: 3;
        margin-top: 2rem;
    }

    .hero h1,
    .page-hero h1 {
        font-size: 2rem;
    }

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

    .phone-large {
        font-size: 1.5rem;
    }

    .contact-info {
        flex-direction: column;
        gap: 0.5rem;
        align-items: flex-start;
    }

    .credentials-list {
        grid-template-columns: 1fr;
    }

    .hero-photo {
        height: 300px;
    }

    .credentials-overlay {
        position: static;
        margin-top: 2rem;
    }

    .carousel-container {
        padding: 0 3rem;
    }

    .carousel-btn {
        padding: 0;  /* Remove default button padding */
    }

    .carousel-btn.prev {
        padding-bottom: 8px;  /* Nudge < to the right slightly */
        padding-right: 20px;
    }

    .carousel-btn.next {
        padding-bottom: 8px;  /* Nudge > to the left slightly */
        padding-left: 20px;
    }

    .review-text {
        font-size: 1rem;
    }

    .review-card {
        padding: 2rem 1rem;
        min-height: 250px;
    }

    .service-detail {
        padding: 3rem 0;
    }

    .service-detail-inner {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .service-detail h2 {
        font-size: 1.6rem;
    }
}
