/* ============================================
   RESPONSIVE STYLES - MOBILE & TABLET FIX
   ============================================ */

/* Tablet Landscape (1024px and below) */
@media (max-width: 1024px) {
    .container {
        padding: 0 30px;
    }

    /* Hero Section */
    .hero {
        min-height: 500px;
        padding: 80px 0;
    }

    .hero-content h1 {
        font-size: 42px;
    }

    .hero-content p {
        font-size: 18px;
    }

    /* Grid Layouts */
    .features-grid,
    .specializations-grid,
    .treatments-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 25px;
    }

    /* Cards */
    .feature-card,
    .specialization-card,
    .treatment-card {
        padding: 25px;
    }

    /* Stats Section */
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }

    /* Testimonials */
    .testimonial-card {
        padding: 25px;
    }
}

/* Tablet Portrait (768px and below) */
@media (max-width: 768px) {
    .container {
        padding: 0 20px;
    }

    /* Typography */
    h1 {
        font-size: 32px !important;
    }

    h2 {
        font-size: 28px !important;
    }

    h3 {
        font-size: 22px !important;
    }

    h4 {
        font-size: 18px !important;
    }

    p,
    li {
        font-size: 15px;
    }

    /* Header & Navigation */
    .top-bar {
        padding: 8px 0;
    }

    .top-bar-content {
        flex-direction: column;
        gap: 10px;
        text-align: center;
    }

    .top-bar-left,
    .top-bar-right {
        justify-content: center;
        flex-wrap: wrap;
    }

    .header {
        padding: 15px 0;
        position: sticky;
        top: 0;
        z-index: 99999;
    }

    .nav-menu {
        display: none;
        position: fixed;
        top: 120px;
        left: 0;
        width: 100%;
        height: calc(100vh - 120px);
        background: var(--text-white);
        flex-direction: column;
        align-items: center;
        justify-content: flex-start;
        z-index: 9998;
        padding: 20px;
        overflow-y: auto;
    }

    .nav-menu.active {
        display: flex;
    }

    .nav-menu li {
        margin: 15px 0;
    }

    .nav-menu a {
        font-size: 20px;
    }

    .mobile-menu-toggle {
        display: block;
        background: none;
        border: none;
        font-size: 28px;
        color: var(--primary-color);
        cursor: pointer;
        padding: 5px;
        z-index: 100000;
        position: relative;
    }

    /* Hero Section */
    .hero {
        min-height: 400px;
        padding: 60px 0;
        text-align: center;
    }

    .hero-content {
        max-width: 100%;
    }

    .hero-content h1 {
        font-size: 32px;
        margin-bottom: 15px;
    }

    .hero-content p {
        font-size: 16px;
        margin-bottom: 25px;
    }

    .hero-buttons {
        flex-direction: column;
        gap: 12px;
    }

    .hero-buttons .btn {
        width: 100%;
        text-align: center;
    }

    /* Sections */
    .section {
        padding: 50px 0;
    }

    .section-header {
        margin-bottom: 35px;
    }

    .section-title {
        font-size: 28px;
        margin-bottom: 12px;
    }

    .section-subtitle {
        font-size: 15px;
    }

    /* Grid Layouts - Single Column */
    .features-grid,
    .specializations-grid,
    .treatments-grid,
    .benefits-grid,
    .therapies-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    /* Cards */
    .feature-card,
    .specialization-card,
    .treatment-card,
    .benefit-card,
    .therapy-card {
        padding: 20px;
        text-align: center;
    }

    .feature-card .icon,
    .specialization-card .icon,
    .benefit-card .icon {
        font-size: 40px;
        margin-bottom: 15px;
    }

    .feature-card h3,
    .specialization-card h3,
    .treatment-card h3 {
        font-size: 20px;
        margin-bottom: 10px;
    }

    /* Stats Section */
    .stats-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .stat-card {
        padding: 25px 20px;
    }

    .stat-number {
        font-size: 36px;
    }

    .stat-label {
        font-size: 14px;
    }

    /* About Section */
    .about-content {
        flex-direction: column;
        gap: 30px;
    }

    .about-image,
    .about-text {
        flex: 1 1 100%;
    }

    .about-image {
        max-width: 100%;
        text-align: center;
    }

    .about-image img {
        max-width: 300px;
        margin: 0 auto;
    }

    /* Doctor Profile */
    .doctor-profile {
        flex-direction: column;
        text-align: center;
    }

    .doctor-image {
        margin-right: 0;
        margin-bottom: 25px;
    }

    .doctor-image img {
        max-width: 100%;
    }

    .qualifications-list {
        text-align: left;
    }

    /* Specializations */
    .specialization-detail {
        flex-direction: column;
    }

    .specialization-image,
    .specialization-content {
        flex: 1 1 100%;
    }

    .specialization-image {
        margin-bottom: 25px;
    }

    /* Treatments */
    .treatment-detail {
        flex-direction: column;
    }

    .treatment-image {
        margin-bottom: 25px;
    }

    /* Panchkarma */
    .therapy-detail {
        flex-direction: column;
    }

    .therapy-image {
        margin-bottom: 25px;
    }

    /* Testimonials */
    .testimonials-slider {
        padding: 0 10px;
    }

    .testimonial-card {
        padding: 20px;
    }

    .testimonial-text {
        font-size: 15px;
        margin-bottom: 15px;
    }

    .testimonial-author {
        font-size: 15px;
    }

    .testimonial-location {
        font-size: 13px;
    }

    /* Contact Section */
    .contact-grid {
        grid-template-columns: 1fr;
        gap: 25px;
    }

    .contact-info-card {
        padding: 20px;
    }

    .contact-form {
        padding: 25px;
    }

    .form-row {
        flex-direction: column;
    }

    .form-group {
        margin-bottom: 15px;
    }

    /* CTA Section */
    .cta-section {
        padding: 40px 0;
    }

    .cta-content h2 {
        font-size: 26px;
        margin-bottom: 15px;
    }

    .cta-content p {
        font-size: 15px;
        margin-bottom: 20px;
    }

    .cta-buttons {
        flex-direction: column;
        gap: 12px;
    }

    .cta-buttons .btn {
        width: 100%;
        text-align: center;
    }

    /* Footer */
    .footer-content {
        grid-template-columns: 1fr;
        gap: 30px;
        text-align: center;
    }

    .footer-column h3 {
        font-size: 18px;
        margin-bottom: 15px;
    }

    .footer-column ul li {
        margin-bottom: 8px;
    }

    .footer-bottom {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }

    /* Page Header */
    .page-header {
        padding: 60px 0 40px;
    }

    .page-header h1 {
        font-size: 32px;
    }

    .breadcrumbs {
        font-size: 13px;
    }

    /* Buttons */
    .btn {
        padding: 12px 24px;
        font-size: 14px;
    }

    /* Tables */
    table {
        font-size: 14px;
    }

    table th,
    table td {
        padding: 10px 8px;
    }

    /* Images */
    .wp-block-image,
    .alignleft,
    .alignright {
        float: none !important;
        margin: 20px auto !important;
        text-align: center;
    }

    /* Floating Buttons */
    .whatsapp-float,
    .prescription-floating-btn {
        bottom: 20px;
    }

    .whatsapp-float {
        left: 20px;
        width: 50px;
        height: 50px;
        font-size: 24px;
    }

    .prescription-floating-btn {
        right: 20px;
    }

    .prescription-float-trigger {
        padding: 12px 20px;
        font-size: 14px;
    }
}

/* Mobile (480px and below) */
@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }

    /* Typography */
    h1 {
        font-size: 26px !important;
    }

    h2 {
        font-size: 24px !important;
    }

    h3 {
        font-size: 20px !important;
    }

    h4 {
        font-size: 17px !important;
    }

    p,
    li {
        font-size: 14px;
    }

    /* Header */
    .logo {
        font-size: 20px;
    }

    .logo-subtitle {
        font-size: 10px;
    }

    /* Hero */
    .hero {
        min-height: 350px;
        padding: 40px 0;
    }

    .hero-content h1 {
        font-size: 26px;
        line-height: 1.3;
    }

    .hero-content p {
        font-size: 14px;
    }

    .hero-buttons .btn {
        padding: 12px 20px;
        font-size: 13px;
    }

    /* Sections */
    .section {
        padding: 40px 0;
    }

    .section-title {
        font-size: 24px;
    }

    .section-subtitle {
        font-size: 14px;
    }

    /* Cards */
    .feature-card,
    .specialization-card,
    .treatment-card,
    .benefit-card,
    .therapy-card {
        padding: 18px;
    }

    .feature-card .icon {
        font-size: 36px;
    }

    .feature-card h3 {
        font-size: 18px;
    }

    .feature-card p {
        font-size: 14px;
    }

    /* Stats */
    .stat-card {
        padding: 20px 15px;
    }

    .stat-number {
        font-size: 32px;
    }

    .stat-label {
        font-size: 13px;
    }

    /* About Images */
    .about-image img,
    .doctor-image img {
        max-width: 100%;
    }

    /* Contact */
    .contact-form {
        padding: 20px;
    }

    .form-group input,
    .form-group textarea,
    .form-group select {
        padding: 10px;
        font-size: 14px;
    }

    .btn-submit {
        padding: 12px 24px;
        font-size: 14px;
    }

    /* CTA */
    .cta-content h2 {
        font-size: 22px;
    }

    .cta-content p {
        font-size: 14px;
    }

    /* Footer */
    .footer-column {
        margin-bottom: 25px;
    }

    .footer-column h3 {
        font-size: 17px;
    }

    .footer-column ul li {
        font-size: 13px;
    }

    .social-links a {
        width: 35px;
        height: 35px;
        font-size: 16px;
    }

    /* Page Header */
    .page-header {
        padding: 50px 0 30px;
    }

    .page-header h1 {
        font-size: 26px;
    }

    /* Buttons */
    .btn {
        padding: 10px 20px;
        font-size: 13px;
        letter-spacing: 0.5px;
    }

    /* Floating Buttons - Circular on Mobile */
    .prescription-float-trigger span {
        display: none;
    }

    .prescription-float-trigger {
        width: 55px;
        height: 55px;
        padding: 0;
        border-radius: 50%;
        justify-content: center;
    }

    .prescription-float-trigger svg {
        margin: 0;
    }

    /* Modal on Mobile */
    .prescription-modal-content {
        margin: 20px;
        max-width: 100%;
    }

    .prescription-upload-form-wrapper {
        padding: 15px;
    }

    .form-title {
        font-size: 20px;
    }

    /* Tables - Responsive */
    table {
        display: block;
        overflow-x: auto;
        white-space: nowrap;
        font-size: 13px;
    }

    /* Lists */
    ul li,
    ol li {
        margin-bottom: 8px;
    }

    /* Spacing */
    .mb-30 {
        margin-bottom: 20px;
    }

    .mt-30 {
        margin-top: 20px;
    }
}

/* Extra Small Mobile (360px and below) */
@media (max-width: 360px) {
    .container {
        padding: 0 12px;
    }

    h1 {
        font-size: 24px !important;
    }

    h2 {
        font-size: 22px !important;
    }

    .hero-content h1 {
        font-size: 24px;
    }

    .btn {
        padding: 10px 18px;
        font-size: 12px;
    }

    .whatsapp-float,
    .prescription-float-trigger {
        width: 50px;
        height: 50px;
        font-size: 20px;
    }

    .whatsapp-float {
        left: 15px;
        bottom: 15px;
    }

    .prescription-floating-btn {
        right: 15px;
        bottom: 15px;
    }
}

/* Landscape Orientation Fixes */
@media (max-height: 500px) and (orientation: landscape) {
    .hero {
        min-height: 300px;
        padding: 30px 0;
    }

    .nav-menu {
        flex-direction: row;
        flex-wrap: wrap;
        height: auto;
        padding: 20px;
    }

    .nav-menu li {
        margin: 10px 15px;
    }
}

/* Fix for iOS Safari */
@supports (-webkit-touch-callout: none) {
    .hero {
        min-height: -webkit-fill-available;
    }

    input,
    textarea,
    select {
        font-size: 16px !important;
    }
}

/* Fix for Notch Devices */
@supports (padding: max(0px)) {
    .container {
        padding-left: max(20px, env(safe-area-inset-left));
        padding-right: max(20px, env(safe-area-inset-right));
    }

    .whatsapp-float {
        left: max(20px, env(safe-area-inset-left));
        bottom: max(20px, env(safe-area-inset-bottom));
    }

    .prescription-floating-btn {
        right: max(20px, env(safe-area-inset-right));
        bottom: max(20px, env(safe-area-inset-bottom));
    }
}


/* Mobile Menu Toggle Button */
.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 24px;
    color: var(--primary-color);
    cursor: pointer;
    padding: 8px;
    z-index: 10000;
}

@media (max-width: 768px) {
    .mobile-menu-toggle {
        display: block;
    }

    .nav-btn {
        display: none;
    }

    .nav-menu.active {
        display: flex !important;
    }
}

/* Back to Top Button */
.back-to-top {
    position: fixed;
    bottom: 80px;
    right: 30px;
    width: 45px;
    height: 45px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 998;
    box-shadow: 0 4px 15px rgba(45, 90, 39, 0.3);
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    background: var(--primary-dark);
    transform: translateY(-3px);
}

@media (max-width: 768px) {
    .back-to-top {
        bottom: 90px;
        right: 20px;
        width: 40px;
        height: 40px;
        font-size: 14px;
    }
}

/* Sticky Header */
.header.sticky {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: white;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    z-index: 999;
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from {
        transform: translateY(-100%);
    }

    to {
        transform: translateY(0);
    }
}

.header.sticky+* {
    margin-top: 80px;
}

/* Form Error States */
input.error,
textarea.error,
select.error {
    border-color: #dc3545 !important;
    background-color: #fff5f5 !important;
}

/* Loading State */
.loading {
    position: relative;
    pointer-events: none;
    opacity: 0.6;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid var(--primary-color);
    border-top-color: transparent;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Accessibility Improvements */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

/* Focus Visible for Keyboard Navigation */
*:focus-visible {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

button:focus-visible,
a:focus-visible {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* High Contrast Mode Support */
@media (prefers-contrast: high) {
    .btn {
        border: 2px solid currentColor;
    }
}

/* Print Styles */
@media print {

    .mobile-menu-toggle,
    .back-to-top,
    .whatsapp-float,
    .prescription-floating-btn {
        display: none !important;
    }
}