/* ========================================
   eSamadhaan Healthcare - Responsive Design
   ======================================== */

@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap');

:root {
    /* Colors */
    --primary-teal: #00bfa5;
    --primary-blue: #2d6cdf;
    --text-dark: #1a1a1a;
    --text-gray: #666666;
    --bg-light-cyan: #e0f7fa;
    --bg-white: #ffffff;

    /* Sidebar Colors */
    --sidebar-bg: #ffffff;
    --sidebar-text: #333333;
    --sidebar-hover: #f5f5f5;

    /* Service Colors (Pastels) */
    --pastel-pink: #fff0f0;
    --pastel-yellow: #fff9e6;
    --pastel-blue: #e6f7ff;
    --pastel-purple: #f9f0ff;
    --pastel-green: #f0fff4;

    /* Spacing & Layout */
    --sidebar-width: 260px;
    --header-height: 80px;

    /* Font */
    --font-family: 'Poppins', sans-serif;

    /* Additional Variables */
    --accent-teal: #009688;
    --spacing-sm: 0.5rem;
    --spacing-md: 1rem;
    --spacing-lg: 1.5rem;
    --spacing-xl: 3rem;
    --radius-sm: 4px;
    --radius-lg: 12px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-family);
    color: var(--text-dark);
    background-color: #f4f7f6;
    line-height: 1.5;
}

/* Sidebar Overlay */
.sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999;
    display: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.sidebar-overlay.active {
    display: block;
    opacity: 1;
}

/* Sidebar */
.sidebar {
    position: fixed;
    left: 0;
    top: 0;
    width: var(--sidebar-width);
    height: 100vh;
    background: var(--sidebar-bg);
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.05);
    z-index: 1000;
    display: flex;
    flex-direction: column;
    transition: transform 0.3s ease;
}

.sidebar-header {
    background: linear-gradient(to right, var(--primary-teal) 0%, var(--accent-teal) 100%);
    padding: 20px;
    color: white;
    display: flex;
    align-items: center;
    gap: 15px;
}

.profile-img {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background: white;
    padding: 2px;
}

.profile-img img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
}

.profile-info h3 {
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 2px;
}

.profile-info p {
    font-size: 0.75rem;
    opacity: 0.9;
}

.sidebar-menu {
    padding: 20px 0;
    flex: 1;
    overflow-y: auto;
}

.sidebar-menu ul {
    list-style: none;
}

.sidebar-menu li {
    margin-bottom: 5px;
}

.sidebar-menu a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 25px;
    color: var(--sidebar-text);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.2s;
}

.sidebar-menu a:hover {
    background-color: var(--sidebar-hover);
    color: var(--primary-teal);
}

.sidebar-menu a.active {
    color: var(--primary-teal);
    background-color: #e0f7fa;
    border-right: 3px solid var(--primary-teal);
}

.sidebar-menu i {
    width: 20px;
    text-align: center;
    font-size: 1.1rem;
}

/* Main Content */
.main-content {
    margin-left: var(--sidebar-width);
    min-height: 100vh;
}

/* Header */
.top-bar {
    background: #f8f9fa;
    padding: 8px 40px;
    display: flex;
    justify-content: space-between;
    font-size: 0.8rem;
    color: var(--text-gray);
    border-bottom: 1px solid #eee;
}

.top-bar-left,
.top-bar-right {
    display: flex;
    gap: 20px;
    align-items: center;
}

.header-main {
    background: white;
    padding: 15px 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.02);
    position: sticky;
    top: 0;
    z-index: 900;
}

.logo-medpro {
    font-size: 1.5rem;
    font-weight: 700;
    color: #333;
    display: flex;
    align-items: center;
    gap: 8px;
}

.nav-links {
    display: flex;
    gap: 30px;
    list-style: none;
}

.nav-links a {
    text-decoration: none;
    color: #333;
    font-weight: 500;
    font-size: 0.95rem;
}

.header-contact {
    display: flex;
    align-items: center;
    gap: 20px;
}

.phone-number {
    font-weight: 600;
    color: #333;
    display: flex;
    align-items: center;
    gap: 5px;
}

.btn-appointment {
    background: var(--primary-teal);
    color: white;
    padding: 10px 25px;
    border-radius: 4px;
    border: none;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s;
}

.btn-appointment:hover {
    background: var(--accent-teal);
}

/* Mobile Menu Toggle */
.mobile-menu-toggle {
    display: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #333;
    padding: 10px;
}

.mobile-menu-toggle:hover {
    color: var(--primary-teal);
}

/* Hero Section */
.hero-section {
    background: linear-gradient(to right, #e0f7fa 0%, #ffffff 100%);
    padding: 60px 40px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: relative;
    overflow: hidden;
}

.hero-content {
    max-width: 50%;
    z-index: 2;
}

.welcome-text {
    color: var(--primary-teal);
    font-weight: 600;
    margin-bottom: 15px;
    letter-spacing: 1px;
}

.hero-title {
    font-size: 3.5rem;
    line-height: 1.2;
    color: #1a1a1a;
    margin-bottom: 30px;
    font-weight: 700;
}

.hero-buttons {
    display: flex;
    gap: 20px;
    align-items: center;
}

.btn-discover {
    background: var(--primary-teal);
    color: white;
    padding: 15px 35px;
    border-radius: 4px;
    border: none;
    font-weight: 600;
    cursor: pointer;
    font-size: 1rem;
    transition: background 0.3s;
}

.btn-discover:hover {
    background: var(--accent-teal);
}

.btn-call-hero {
    display: flex;
    flex-direction: column;
}

.call-label {
    font-size: 0.75rem;
    color: #666;
    font-weight: 600;
}

.call-number {
    font-size: 1.1rem;
    font-weight: 700;
    color: #333;
}

.hero-image-container {
    position: relative;
    width: 45%;
}

.doctor-img {
    width: 100%;
    max-width: 500px;
    border-radius: 0 0 200px 200px;
}

.floating-badge {
    position: absolute;
    top: 40px;
    left: -20px;
    background: white;
    padding: 15px;
    border-radius: 12px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    gap: 10px;
}

.badge-icon {
    background: #ffe5ec;
    padding: 10px;
    border-radius: 50%;
    font-size: 1.2rem;
}

.doctor-card {
    position: absolute;
    bottom: 40px;
    left: 0;
    background: white;
    padding: 15px 25px;
    border-radius: 8px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    border-left: 4px solid var(--primary-teal);
}

/* Services Section */
.services-section {
    padding: 60px 40px;
    background: white;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 40px;
}

.section-header h2 {
    font-size: 1.5rem;
    font-weight: 600;
}

.view-prices {
    color: var(--primary-teal);
    text-decoration: none;
    font-weight: 500;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.service-card {
    padding: 30px 20px;
    border-radius: 12px;
    text-align: center;
    transition: transform 0.3s;
}

.service-card:hover {
    transform: translateY(-5px);
}

.service-icon {
    font-size: 2rem;
    margin-bottom: 15px;
    display: inline-block;
}

.service-title {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 5px;
    color: #333;
}

.service-subtitle {
    font-size: 0.8rem;
    color: #777;
}

.bg-pink {
    background-color: var(--pastel-pink);
}

.bg-yellow {
    background-color: var(--pastel-yellow);
}

.bg-blue {
    background-color: var(--pastel-blue);
}

.bg-purple {
    background-color: var(--pastel-purple);
}

.bg-green {
    background-color: var(--pastel-green);
}

/* Appointment Section */
.appointment-section {
    padding: 80px 40px;
    background: #e0f7fa;
    display: flex;
    gap: 60px;
    align-items: center;
}

.appointment-content {
    flex: 1;
}

.appointment-content h2 {
    font-size: 2.5rem;
    margin-bottom: 20px;
    color: #1a1a1a;
}

.appointment-form-card {
    flex: 1;
    background: white;
    padding: 40px;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
}

.form-group {
    margin-bottom: 20px;
}

.form-control {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-family: inherit;
}

.btn-submit {
    width: 100%;
    background: var(--primary-teal);
    color: white;
    padding: 15px;
    border: none;
    border-radius: 4px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s;
}

.btn-submit:hover {
    background: var(--accent-teal);
}

/* Testimonials */
.testimonials-section {
    padding: 60px 40px;
    background: #fff;
}

.section-title {
    font-size: 2rem;
    font-weight: 600;
    margin-bottom: 40px;
    color: #1a1a1a;
}

.testimonials-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.testimonial-card {
    background: #f9f9f9;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease;
}

.testimonial-card:hover {
    transform: translateY(-5px);
}

.testimonial-rating {
    color: #ffc107;
    margin-bottom: 15px;
    font-size: 1rem;
}

.testimonial-text {
    font-style: italic;
    color: #555;
    margin-bottom: 20px;
    line-height: 1.6;
    font-size: 0.95rem;
}

.testimonial-author {
    display: flex;
    align-items: center;
    gap: 15px;
}

.author-avatar {
    width: 40px;
    height: 40px;
    background-color: #e0e0e0;
    border-radius: 50%;
    background-image: url('https://www.w3schools.com/howto/img_avatar.png');
    background-size: cover;
}

/* Footer */
.footer {
    background: #111827;
    color: white;
    padding: 60px 40px 20px;
    margin-left: var(--sidebar-width);
}

.footer-top {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr 1fr;
    gap: 40px;
    margin-bottom: 40px;
}

.footer-logo {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 20px;
    display: block;
}

.footer-desc {
    color: #9ca3af;
    margin-bottom: 20px;
    line-height: 1.6;
}

.footer-heading {
    font-size: 1.1rem;
    margin-bottom: 20px;
    font-weight: 600;
}

.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: 12px;
}

.footer-links a {
    color: #9ca3af;
    text-decoration: none;
    transition: color 0.2s;
}

.footer-links a:hover {
    color: white;
}

.footer-bottom {
    border-top: 1px solid #374151;
    padding-top: 20px;
    text-align: center;
    color: #6b7280;
    font-size: 0.9rem;
}

/* ========================================
   RESPONSIVE DESIGN
   ======================================== */

/* Tablet and Mobile (max-width: 1024px) */
@media (max-width: 1024px) {
    .sidebar {
        transform: translateX(-100%);
    }

    .sidebar.active {
        transform: translateX(0);
        box-shadow: 2px 0 20px rgba(0, 0, 0, 0.3);
    }

    body.sidebar-open {
        overflow: hidden;
    }

    .main-content {
        margin-left: 0 !important;
    }

    .top-bar {
        display: none;
    }

    .mobile-menu-toggle {
        display: block !important;
    }

    .header-main {
        padding: 15px 20px;
    }

    .nav-links,
    .header-contact {
        display: none;
    }

    .hero-section {
        flex-direction: column;
        padding: 40px 20px;
        text-align: center;
    }

    .hero-content {
        max-width: 100%;
        margin-bottom: 40px;
        order: 2;
    }

    .hero-title {
        font-size: 2.5rem;
    }

    .hero-image-container {
        padding: 10px 15px;
        font-size: 0.85rem;
    }

    .doctor-card h3 {
        font-size: 0.95rem !important;
    }

    .doctor-card p {
        font-size: 0.75rem !important;
    }


    .hero-buttons {
        justify-content: center;
        flex-direction: column;
        gap: 15px;
    }

    .btn-discover,
    .btn-call-hero {
        width: 100%;
        text-align: center;
    }

    .services-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }

    .section-header {
        flex-direction: column;
        gap: 10px;
        text-align: center;
    }

    .appointment-section {
        flex-direction: column;
        padding: 40px 20px;
        gap: 40px;
    }

    .appointment-content h2 {
        font-size: 2rem;
    }

    .testimonials-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .testimonials-section {
        padding: 40px 20px;
    }

    .footer {
        padding: 40px 20px;
        margin-left: 0;
    }

    .footer-top {
        grid-template-columns: 1fr;
        gap: 30px;
    }
}

/* Mobile Only (max-width: 480px) */
@media (max-width: 480px) {
    .hero-title {
        font-size: 2rem !important;
    }

    .services-grid {
        grid-template-columns: 1fr !important;
    }
}

/* Large Tablets (769px - 1024px) */
@media (min-width: 769px) and (max-width: 1024px) {
    .services-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .testimonials-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .footer-top {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Desktop (1025px+) */
@media (min-width: 1025px) {
    .sidebar {
        transform: translateX(0) !important;
    }

    .mobile-menu-toggle {
        display: none !important;
    }

    .main-content {
        margin-left: var(--sidebar-width);
    }
}


/* Auth Buttons */
.btn-login {
    background: transparent;
    color: var(--primary-teal);
    padding: 8px 20px;
    border: 2px solid var(--primary-teal);
    border-radius: 4px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.3s;
    margin-right: 10px;
}

.btn-login:hover {
    background: var(--primary-teal);
    color: white;
}

.btn-signup {
    background: var(--primary-teal);
    color: white;
    padding: 10px 25px;
    border-radius: 4px;
    border: none;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.3s;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.btn-signup:hover {
    background: var(--accent-teal);
    transform: translateY(-2px);
    box-shadow: 0 6px 8px rgba(0, 0, 0, 0.15);
}

.auth-buttons {
    display: none !important;
}

/* Hide Login/Signup Buttons */
.auth-buttons {
    display: none !important;
}

/* =========================================
   NEW STYLES FOR PHONE BUTTON AND MENU HOVER
   ========================================= */

/* Phone Button Styling */
.btn-phone {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--primary-teal);
    font-weight: 600;
    text-decoration: none;
    padding: 8px 16px;
    border: 2px solid var(--primary-teal);
    border-radius: 50px;
    /* Pill shape */
    transition: all 0.3s ease;
    margin-right: 15px;
    /* Spacing from the next button */
}

.btn-phone:hover {
    background-color: var(--primary-teal);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.btn-phone i {
    font-size: 1rem;
}

/* Menu Hover Effects */
.nav-links a {
    position: relative;
    transition: color 0.3s ease;
}

.nav-links a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -5px;
    left: 0;
    background-color: var(--primary-teal);
    transition: width 0.3s ease;
}

.nav-links a:hover::after {
    width: 100%;
}

.nav-links a:hover {
    color: var(--primary-teal);
}

/* Ensure header contact spacing */
.header-contact {
    gap: 10px;
}

/* Fix spacing for Service CTA buttons */
.service-cta-container {
    margin-top: 40px !important;
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
}

/* Sidebar Close Button - Hidden on Desktop */
.sidebar-close {
    display: none;
    position: absolute;
    right: 20px;
    top: 20px;
    font-size: 1.5rem;
    cursor: pointer;
    color: white;
}

@media (max-width: 1024px) {
    .sidebar-close {
        display: block;
    }
}

/* =========================================
   GLOBAL HOVER EFFECTS FOR BUTTONS
   ========================================= */

/* Common Button Hover Animation */
.btn-appointment,
.btn-call-hero,
.btn-discover,
.btn-login,
.btn-phone,
.btn-signup,
.btn-submit,
.mobile-btn,
.footer-section a i,
/* Social icons in footer usually inside a link */
.service-card

/* Service cards also act as buttons */
    {
    transition: all 0.3s ease !important;
}

/* Hover State */
.btn-appointment:hover,
.btn-call-hero:hover,
.btn-discover:hover,
.btn-login:hover,
.btn-phone:hover,
.btn-signup:hover,
.btn-submit:hover,
.mobile-btn:hover {
    transform: translateY(-3px) !important;
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15) !important;
    /* Ensure opacity or brightness change for better feedback */
    filter: brightness(1.05);
}

/* Specific fix for footer social icons if they are just icons inside links */
.footer-section a:hover i {
    transform: translateY(-3px);
    /* Color change is usually handled by specific classes, but we can add a glow */
    text-shadow: 0 0 8px rgba(255, 255, 255, 0.5);
}

/* Mobile Responsiveness Check */
/* Ensure hover effects don't stick on touch devices if possible, 
   but usually simple transform is fine. 
   We can add :active state for better mobile feedback */

.btn-appointment:active,
.btn-call-hero:active,
.btn-discover:active,
.btn-login:active,
.btn-phone:active,
.btn-signup:active,
.btn-submit:active,
.mobile-btn:active {
    transform: translateY(-1px) !important;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1) !important;
}

/* Mobile Hero Section Fix */
@media (max-width: 768px) {
    .hero-section {
        flex-direction: column;
        padding: 40px 20px;
        text-align: center;
        height: auto;
        /* Ensure height adapts */
    }

    .hero-content {
        max-width: 100%;
        margin-bottom: 50px;
        /* Add space between text and image */
        z-index: 5;
        /* Ensure text is on top if overlap happens */
    }

    .hero-image-container {
        width: 100%;
        display: flex;
        justify-content: center;
        margin-top: 20px;
        position: relative;
        /* Keep relative for absolute children */
    }

    .hero-buttons {
        justify-content: center;
    }

    .doctor-img {
        max-width: 80%;
        /* Reduce image size slightly on mobile */
        border-radius: 0 0 100px 100px;
    }

    .doctor-card {
        left: 50%;
        transform: translateX(-50%);
        width: 90%;
        max-width: 320px;
        bottom: 20px;
        /* Adjust bottom position */
        text-align: left;
        /* Keep card text left aligned */
    }

    .floating-badge {
        left: 0;
        /* Move to the edge */
        top: 10px;
        /* Move slightly up */
        transform: scale(0.9);
        /* Make it slightly smaller */
        transform-origin: left top;
    }
}