/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Open Sans', sans-serif;
    color: #333;
    line-height: 1.6;
    background-color: #fff;
    overflow-x: hidden;
}

/* Container responsive adjustments */
.container {
    padding-left: 15px;
    padding-right: 15px;
}

a {
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
}

a:hover {
    opacity: 0.8;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Ensure all images are responsive */
img.img-fluid {
    max-width: 100%;
    height: auto;
}

/* Skip to Content */
.skip-to-content {
    position: absolute;
    left: -9999px;
    z-index: 999;
}

.skip-to-content:focus {
    left: 50%;
    transform: translateX(-50%);
    padding: 10px 20px;
    background: #000;
    color: #fff;
}

/* Sticky Header Wrapper */
.sticky-header-wrapper {
    position: sticky;
    top: 0;
    z-index: 1003;
    width: 100%;
}

/* Top Bar */
.top-bar {
    background-color: #1a1a1a;
    color: #fff;
    padding: 10px 0;
    font-size: 14px;
    text-align: center;
    width: 100%;
}

.top-bar p {
    margin: 0;
    text-align: center;
}

.close-address-bar {
    background: none;
    border: none;
    color: #fff;
    font-size: 18px;
    cursor: pointer;
    padding: 0;
}

/* Header */
.main-header {
    background-color: #ffffff;
    padding: 20px 0;
    border-bottom: 2px solid #d32f2f;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    width: 100%;
}

.header-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
}

/* Phone icon for mobile */
.phone-icon-mobile {
    display: none;
    color: #d32f2f;
    font-size: 24px;
    text-decoration: none;
}

/* Desktop only navigation */
.desktop-only {
    display: block;
}

.logo-img {
    max-height: 80px;
    width: auto;
}

.header-nav-list {
    list-style: none;
    display: flex;
    gap: 20px;
    align-items: center;
    margin: 0;
    padding: 0;
}

.header-nav-list li {
    margin: 0;
}

.header-nav-list li a {
    color: #333;
}

.header-nav-list li a:hover {
    color: #d32f2f;
}

.phone-link {
    color: #333;
    font-size: 18px;
    font-weight: 400;
    text-decoration: none;
}

.phone-link:hover {
    color: #d32f2f;
}

.header-nav-list li a[target="_blank"] {
    color: #333;
    font-weight: 400;
    text-decoration: none;
}

.header-nav-list li a[target="_blank"]:hover {
    color: #d32f2f;
}

.btn-pay-bill,
.btn-request-appt {
    background-color: #d32f2f;
    color: #fff !important;
    padding: 10px 20px;
    border-radius: 5px;
    font-weight: 600;
    border: none;
    cursor: pointer;
    display: inline-block;
    text-decoration: none;
}

.btn-pay-bill:hover,
.btn-request-appt:hover {
    background-color: #b71c1c;
    color: #fff !important;
}

/* Main Navigation */
.main-nav {
    background-color: #1a1a1a;
    padding: 15px 0;
    border-bottom: 1px solid #333;
    overflow: visible;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    width: 100%;
    position: relative;
}

@media (max-width: 768px) {
    .main-nav {
        background-color: #ffffff;
        border-bottom: 1px solid #ddd;
    }
}

/* Hide mobile-only items on desktop */
.mobile-only {
    display: none !important;
}

/* Mobile Menu Toggle Button */
.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: space-around;
    width: 30px;
    height: 30px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 1004;
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
}

/* Mobile menu action buttons */
.mobile-menu-actions {
    display: none;
    flex-direction: column;
    gap: 10px;
    padding: 20px;
    background-color: #f5f5f5;
    border-bottom: 2px solid #d32f2f;
}

.mobile-menu-actions a,
.mobile-menu-actions button {
    width: 100%;
    padding: 12px 20px;
    text-align: center;
    border-radius: 5px;
    font-weight: 600;
    text-decoration: none;
    display: block;
}

.mobile-phone-link {
    background-color: #333;
    color: #fff;
    font-size: 18px;
}

.mobile-review-link {
    background-color: #fff;
    color: #333;
    border: 2px solid #d32f2f;
}

.btn-pay-bill-mobile,
.btn-request-appt-mobile {
    background-color: #d32f2f;
    color: #fff;
    border: none;
    cursor: pointer;
    font-size: 16px;
}

.btn-pay-bill-mobile:hover,
.btn-request-appt-mobile:hover {
    background-color: #b71c1c;
    color: #fff;
}

.mobile-menu-toggle span {
    width: 100%;
    height: 3px;
    background-color: #000;
    border-radius: 3px;
    transition: all 0.3s ease;
    display: block;
}

@media (max-width: 768px) {
    .mobile-menu-toggle span {
        background-color: #000;
    }
}

.mobile-menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(8px, 8px);
}

.mobile-menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.mobile-menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -7px);
}

/* Ensure header and nav stick together properly */
body {
    padding-top: 0;
}

.main-nav .container {
    overflow: visible;
}

.main-nav-list {
    list-style: none;
    display: flex;
    justify-content: center;
    gap: 30px;
    margin: 0;
    padding: 0;
    flex-wrap: wrap;
    position: relative;
    overflow: visible;
}

.main-nav-list > li {
    position: relative;
}

.main-nav-list > li > a {
    color: #fff;
    font-size: 16px;
    font-weight: 500;
    text-transform: uppercase;
    padding: 10px 0;
    position: relative;
    display: flex;
    align-items: center;
    gap: 5px;
}

.main-nav-list > li > a i {
    font-size: 12px;
    transition: transform 0.3s ease;
}

.main-nav-list > li:hover > a {
    color: #d32f2f;
}

.main-nav-list > li:hover > a i {
    transform: rotate(180deg);
}

/* Dropdown Menu */
.dropdown-menu {
    position: absolute;
    top: calc(100% + 5px);
    left: 0;
    background-color: #2a2a2a;
    min-width: 220px;
    list-style: none;
    padding: 0;
    margin: 0;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.5);
    z-index: 9999;
    border-top: 3px solid #d32f2f;
    margin-top: 0;
    display: block;
}

/* Create a bridge to prevent dropdown from closing when moving mouse */
.main-nav-list > li.has-dropdown::before {
    content: '';
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    height: 5px;
    background: transparent;
    z-index: 10000;
}

.main-nav-list > li:hover > .dropdown-menu,
.main-nav-list > li.has-dropdown:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    display: block;
}

/* Ensure dropdown stays open when hovering over it */
.main-nav-list > li.has-dropdown:hover .dropdown-menu,
.dropdown-menu:hover {
    opacity: 1 !important;
    visibility: visible !important;
    transform: translateY(0) !important;
    display: block !important;
}

/* Fix for dropdown positioning */
.main-nav-list > li.has-dropdown {
    position: relative;
}

.main-nav-list > li.has-dropdown > .dropdown-menu {
    left: 0;
    transform: translateY(-10px);
}

.dropdown-menu li {
    margin: 0;
}

.dropdown-menu li a {
    color: #ccc;
    font-size: 14px;
    font-weight: 400;
    padding: 12px 20px;
    display: block;
    text-transform: none;
    transition: all 0.3s ease;
    border-left: 3px solid transparent;
    white-space: nowrap;
    text-align: left;
}

.dropdown-menu li a:hover {
    background-color: #333;
    color: #d32f2f;
    border-left-color: #d32f2f;
    padding-left: 25px;
}

.dropdown-menu li:first-child a {
    border-top: none;
}

.dropdown-menu li:last-child a {
    border-bottom: none;
}

/* Additional styling to match website design */
.dropdown-menu {
    border-radius: 0 0 5px 5px;
}

.dropdown-menu li {
    border-bottom: 1px solid #333;
}

.dropdown-menu li:last-child {
    border-bottom: none;
}

/* Mega Menu for large dropdowns */
.mega-menu {
    min-width: 400px;
    max-width: 600px;
    max-height: 500px;
    overflow-y: auto;
    columns: 2;
    column-gap: 0;
    left: 50%;
    transform: translateX(-50%) translateY(-10px);
    display: block;
}

.main-nav-list > li.has-dropdown:hover > .mega-menu,
.mega-menu:hover {
    transform: translateX(-50%) translateY(0) !important;
    opacity: 1 !important;
    visibility: visible !important;
    display: block !important;
}

.mega-menu li {
    break-inside: avoid;
    page-break-inside: avoid;
}

.mega-menu li a {
    padding: 10px 20px;
    font-size: 13px;
}

/* Scrollbar styling for mega menu */
.mega-menu::-webkit-scrollbar {
    width: 6px;
}

.mega-menu::-webkit-scrollbar-track {
    background: #1a1a1a;
}

.mega-menu::-webkit-scrollbar-thumb {
    background: #d32f2f;
    border-radius: 3px;
}

.mega-menu::-webkit-scrollbar-thumb:hover {
    background: #b71c1c;
}

/* Hero Slider */
.hero-slider {
    position: relative;
    margin-bottom: 40px;
}

.hero-slider .carousel-item {
    position: relative;
    height: 600px;
    overflow: hidden;
}

.hero-slider .carousel-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.carousel-caption {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    color: #fff;
    z-index: 10;
    width: 90%;
    max-width: 800px;
}

.carousel-caption h2 {
    font-size: 36px;
    font-weight: 700;
    margin-bottom: 20px;
    text-transform: uppercase;
    color: #fff;
}

.carousel-caption h1 {
    font-size: 42px;
    font-weight: 700;
    margin-bottom: 30px;
    line-height: 1.2;
    text-transform: uppercase;
    color: #fff;
}

.btn-request-appt-large {
    background-color: #d32f2f;
    color: #fff !important;
    padding: 15px 40px;
    border-radius: 5px;
    font-weight: 700;
    font-size: 18px;
    text-transform: uppercase;
    display: inline-block;
    margin-top: 20px;
    text-decoration: none;
}

.btn-request-appt-large:hover {
    background-color: #b71c1c;
    color: #fff !important;
}

.carousel-control-prev,
.carousel-control-next {
    width: 50px;
    height: 50px;
    background-color: rgba(0, 0, 0, 0.5);
    border-radius: 50%;
    top: 50%;
    transform: translateY(-50%);
    opacity: 0.8;
}

.carousel-control-prev:hover,
.carousel-control-next:hover {
    opacity: 1;
}

.carousel-control-prev {
    left: 20px;
}

.carousel-control-next {
    right: 20px;
}

.carousel-control-prev-icon,
.carousel-control-next-icon {
    width: 20px;
    height: 20px;
}

/* Quick Links */
.quick-links {
    background-color: #f5f5f5;
    padding: 40px 0;
    margin-bottom: 40px;
}

.quick-links h4 {
    text-align: center;
    margin-bottom: 0;
}

.quick-links h4 a {
    color: #333;
    font-size: 18px;
    font-weight: 600;
}

.quick-links h4 a:hover {
    color: #d32f2f;
}

.quick-links h4 small {
    display: block;
    font-size: 14px;
    font-weight: 400;
    margin-top: 5px;
    color: #666;
}

/* Gallery Section */
.gallery-section {
    padding: 40px 0;
    background-color: #fff;
}

.gallery-item {
    display: block;
    margin-bottom: 20px;
    overflow: hidden;
    border-radius: 5px;
}

.gallery-item img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.gallery-item:hover img {
    transform: scale(1.1);
}

/* What We Treat Section */
.what-we-treat {
    padding: 60px 0;
    background-color: #f9f9f9;
}

.condition-buttons {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-bottom: 40px;
}

.condition-btn {
    text-align: center;
    padding: 20px;
    background-color: #fff;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.condition-btn:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.2);
}

.condition-btn img {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 50%;
    margin-bottom: 15px;
}

.condition-btn p {
    font-weight: 600;
    color: #333;
    margin: 0;
}

.body-diagram-section {
    position: relative;
    margin-bottom: 30px;
}

.body-diagram {
    width: 100%;
    max-width: 500px;
    margin: 0 auto;
    display: block;
}

.body-links {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.body-link {
    position: absolute;
    font-size: 11px;
    color: #d32f2f;
    font-weight: 600;
    background-color: rgba(255, 255, 255, 0.9);
    padding: 5px 8px;
    border-radius: 3px;
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 10;
}

.body-diagram-section:hover .body-link {
    opacity: 1;
}

.body-link.elbow {
    top: 30%;
    left: 20%;
}

.body-link.foot {
    bottom: 10%;
    left: 45%;
}

.body-link.shoulder {
    top: 20%;
    left: 50%;
}

.body-link.head {
    top: 5%;
    left: 50%;
}

.body-link.knee {
    bottom: 25%;
    left: 50%;
}

.body-link.back {
    top: 40%;
    left: 45%;
}

.body-link.hip {
    bottom: 35%;
    left: 50%;
}

.body-diagram-text {
    text-align: center;
    padding: 20px;
}

.body-diagram-text h2 {
    font-size: 36px;
    font-weight: 700;
    margin-bottom: 15px;
    color: #333;
}

.body-diagram-text h3 {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 15px;
    color: #666;
}

.body-diagram-text p {
    color: #666;
    line-height: 1.8;
}

/* Testimonials Section */
.testimonials-section {
    padding: 60px 0;
    background-color: #fff;
}

.testimonials-section h2 {
    font-size: 36px;
    font-weight: 700;
    margin-bottom: 15px;
    color: #333;
}

.testimonials-section h3 {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 20px;
    color: #666;
}

.testimonials-section p {
    color: #666;
    line-height: 1.8;
    margin-bottom: 20px;
}

.btn-view-testimonials {
    background-color: #d32f2f;
    color: #fff;
    padding: 12px 30px;
    border-radius: 5px;
    font-weight: 600;
    display: inline-block;
    margin-top: 20px;
}

.btn-view-testimonials:hover {
    background-color: #b71c1c;
    color: #fff;
}

.testimonial-card {
    background-color: #f9f9f9;
    padding: 30px;
    border-radius: 10px;
    text-align: center;
    height: 100%;
}

.testimonial-img {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 20px;
}

.testimonial-card h4 {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 15px;
    color: #333;
}

.testimonial-card p {
    color: #666;
    line-height: 1.8;
    margin-bottom: 15px;
}

.testimonial-author {
    font-weight: 600;
    color: #d32f2f;
    font-style: italic;
}

/* How We Treat Section */
.how-we-treat {
    padding: 60px 0;
    background-color: #f9f9f9;
}

.treatment-card {
    background-color: #fff;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    margin-bottom: 30px;
    text-align: center;
    height: 100%;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.treatment-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.2);
}

.treatment-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 5px;
    margin-bottom: 15px;
}

.treatment-card h3 {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 15px;
    color: #333;
}

.treatment-card h3 a {
    color: #333;
}

.treatment-card h3 a:hover {
    color: #d32f2f;
}

.treatment-card p {
    color: #666;
    line-height: 1.8;
    margin-bottom: 15px;
    font-size: 14px;
}

.read-more {
    color: #d32f2f;
    font-weight: 600;
    font-size: 14px;
}

.read-more:hover {
    color: #b71c1c;
}

.how-we-treat h2 {
    font-size: 36px;
    font-weight: 700;
    margin-bottom: 15px;
    color: #333;
    text-align: center;
}

.how-we-treat h3 {
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 20px;
    color: #666;
    text-align: center;
}

.how-we-treat > .container > .row:last-child p {
    color: #666;
    line-height: 1.8;
    margin-bottom: 20px;
    text-align: center;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
}

.btn-view-treatments {
    background-color: #d32f2f;
    color: #fff;
    padding: 12px 30px;
    border-radius: 5px;
    font-weight: 600;
    display: inline-block;
    margin-top: 20px;
}

.btn-view-treatments:hover {
    background-color: #b71c1c;
    color: #fff;
}

/* About Section */
.about-section {
    padding: 60px 0;
    background-color: #fff;
}

.about-section h2 {
    font-size: 42px;
    font-weight: 700;
    margin-bottom: 20px;
    color: #333;
    line-height: 1.2;
}

.about-section h3 {
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 30px;
    color: #666;
}

.about-section p {
    color: #666;
    line-height: 1.8;
    margin-bottom: 20px;
}

.about-section p a {
    color: #d32f2f;
    font-weight: 600;
}

.about-section p a:hover {
    color: #b71c1c;
}

.about-buttons {
    margin-top: 30px;
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.btn-learn-more {
    background-color: #333;
    color: #fff;
    padding: 12px 30px;
    border-radius: 5px;
    font-weight: 600;
    display: inline-block;
}

.btn-learn-more:hover {
    background-color: #1a1a1a;
    color: #fff;
}

/* Video Section */
.video-section {
    padding: 60px 0;
    background-color: #f9f9f9;
}

.video-wrapper {
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
    overflow: hidden;
}

.video-wrapper iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.video-section h2 {
    font-size: 36px;
    font-weight: 700;
    margin-bottom: 30px;
    color: #333;
    text-align: center;
}

.btn-order-book {
    background-color: #d32f2f;
    color: #fff;
    padding: 15px 40px;
    border-radius: 5px;
    font-weight: 700;
    font-size: 18px;
    text-transform: uppercase;
    display: inline-block;
    margin: 0 auto;
}

.btn-order-book:hover {
    background-color: #b71c1c;
    color: #fff;
}

/* CTA Section */
.cta-section {
    padding: 60px 0;
    background-color: #2a2a2a;
    color: #fff;
}

.cta-section h2 {
    font-size: 36px;
    font-weight: 700;
    margin-bottom: 0;
    color: #fff;
}

.phone-link-large {
    color: #fff;
    font-size: 24px;
    font-weight: 600;
    display: block;
    margin-top: 15px;
}

/* Newsletter Section */
.newsletter-section {
    padding: 60px 0;
    background-color: #f9f9f9;
}

.newsletter-section h3 {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 30px;
    color: #333;
}

.newsletter-form {
    margin-bottom: 20px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #333;
}

.required {
    color: #d32f2f;
}

.form-control {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #ddd;
    border-radius: 5px;
    font-size: 16px;
    transition: border-color 0.3s ease;
}

.form-control:focus {
    outline: none;
    border-color: #d32f2f;
}

.btn-subscribe {
    background-color: #d32f2f;
    color: #fff;
    padding: 12px 30px;
    border-radius: 5px;
    font-weight: 600;
    border: none;
    cursor: pointer;
    font-size: 16px;
}

.btn-subscribe:hover {
    background-color: #b71c1c;
}

.newsletter-section p {
    color: #666;
    line-height: 1.8;
}

/* Footer */
.main-footer {
    background-color: #1a1a1a;
    color: #fff;
    padding: 60px 0 20px;
}

.footer-top {
    margin-bottom: 40px;
}

.footer-logo img {
    max-height: 80px;
    width: auto;
    margin-bottom: 20px;
}

.footer-top h3 {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 15px;
    color: #fff;
    text-transform: uppercase;
}

.footer-top h2 {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 15px;
    margin-top: 30px;
    color: #fff;
    text-transform: uppercase;
}

.footer-top p {
    color: #ccc;
    line-height: 1.8;
    margin-bottom: 15px;
}

.footer-top p a {
    color: #ccc;
}

.footer-top p a:hover {
    color: #d32f2f;
}

.footer-nav {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-nav li {
    margin-bottom: 10px;
}

.footer-nav li a {
    color: #ccc;
    font-size: 14px;
}

.footer-nav li a:hover {
    color: #d32f2f;
}

.social-links {
    list-style: none;
    display: flex;
    gap: 15px;
    padding: 0;
    margin-top: 20px;
}

.social-links li a {
    color: #fff;
    font-size: 24px;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #333;
    border-radius: 50%;
    transition: background-color 0.3s ease;
}

.social-links li a:hover {
    background-color: #d32f2f;
    color: #fff;
}

.footer-bottom {
    border-top: 1px solid #333;
    padding-top: 30px;
    margin-top: 40px;
}

.footer-bottom p {
    color: #ccc;
    font-size: 14px;
    margin-bottom: 10px;
}

.footer-bottom p a {
    color: #ccc;
}

.footer-bottom p a:hover {
    color: #d32f2f;
}

.practice-promotions {
    display: inline-block;
    margin-bottom: 10px;
}

.practice-promotions img {
    max-height: 40px;
    width: auto;
}

/* Responsive Design */

/* Tablet and below */
@media (max-width: 992px) {
    .container {
        max-width: 100%;
        padding-left: 20px;
        padding-right: 20px;
    }

    .header-top {
        flex-wrap: wrap;
    }

    .header-nav-list {
        gap: 10px;
        flex-wrap: wrap;
    }

    .logo-img {
        max-height: 60px;
    }

    .main-nav-list {
        gap: 20px;
    }

    /* Hero adjustments for tablet */
    .hero-slider .carousel-item {
        height: 500px;
    }

    .carousel-caption h1 {
        font-size: 32px;
    }

    .carousel-caption h2 {
        font-size: 24px;
    }

    /* Section padding adjustments */
    section {
        padding-left: 15px;
        padding-right: 15px;
    }
}

/* Mobile and Tablet */
@media (max-width: 768px) {
    /* Mobile Menu Toggle */
    .mobile-menu-toggle {
        display: flex;
    }

    /* Hide desktop navigation */
    .desktop-only {
        display: none !important;
    }

    /* Show mobile phone icon */
    .phone-icon-mobile {
        display: block;
    }

    /* Header adjustments - Match old website design */
    .header-top {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        gap: 0;
        padding: 10px 0;
    }

    .logo-section {
        flex: 1;
        text-align: center;
    }

    .logo-img {
        max-height: 50px;
        margin: 0 auto;
    }

    /* Show mobile-only nav items on mobile */
    .mobile-only {
        display: block !important;
    }

    /* Show mobile menu actions */
    .mobile-menu-actions {
        display: flex;
    }

    /* Container adjustments */
    .container {
        padding-left: 15px;
        padding-right: 15px;
    }

    /* Main Navigation */
    .main-nav {
        padding: 10px 0;
        background-color: #ffffff;
        border-bottom: 1px solid #ddd;
    }

    .main-nav .container {
        position: relative;
        padding-left: 15px;
        padding-right: 50px;
    }

    .main-nav-list {
        flex-direction: column;
        gap: 0;
        display: none;
        width: 100%;
        background-color: #fff;
        margin-top: 10px;
        padding: 0;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
        z-index: 1005;
        max-height: calc(100vh - 150px);
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }

    /* Style main nav scrollbar */
    .main-nav-list::-webkit-scrollbar {
        width: 5px;
    }

    .main-nav-list::-webkit-scrollbar-track {
        background: #f0f0f0;
    }

    .main-nav-list::-webkit-scrollbar-thumb {
        background: #d32f2f;
        border-radius: 3px;
    }

    .main-nav-list.active {
        display: flex;
    }

    .main-nav-list > li {
        border-bottom: 1px solid #e0e0e0;
        width: 100%;
        background-color: #fff;
    }

    /* Style mobile-only items differently */
    .main-nav-list > li.mobile-only {
        background-color: #f8f8f8;
        border-bottom: 2px solid #d32f2f;
    }

    .main-nav-list > li.mobile-only > a {
        color: #d32f2f;
        font-weight: 600;
        padding: 18px 20px;
        text-align: center;
        justify-content: center;
        font-size: 15px;
    }

    .main-nav-list > li.mobile-only > a:hover {
        background-color: #d32f2f;
        color: #fff;
    }

    .main-nav-list > li > a {
        padding: 15px 20px;
        width: 100%;
        justify-content: space-between;
        font-size: 14px;
        color: #333;
    }

    .main-nav-list > li > a:hover {
        background-color: #f5f5f5;
        color: #d32f2f;
    }

    .dropdown-menu {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        display: none;
        background-color: #f9f9f9;
        box-shadow: none;
        border-top: none;
        margin-left: 0;
        margin-top: 0;
        width: 100%;
        min-width: 100%;
        left: 0;
        border-top: 1px solid #e0e0e0;
        border-left: 3px solid #d32f2f;
        max-height: none;
        overflow: visible;
    }

    .dropdown-menu li {
        border-bottom: 1px solid #e8e8e8;
    }

    .dropdown-menu li:last-child {
        border-bottom: none;
    }

    .dropdown-menu li a {
        color: #555;
        padding: 14px 30px 14px 40px;
        font-size: 13px;
        position: relative;
        transition: all 0.2s ease;
        display: block;
        word-wrap: break-word;
        white-space: normal;
    }

    .dropdown-menu li a:before {
        content: '\f105';
        font-family: 'Font Awesome 6 Free';
        font-weight: 900;
        position: absolute;
        left: 25px;
        top: 50%;
        transform: translateY(-50%);
        color: #999;
        font-size: 12px;
        transition: all 0.2s ease;
    }

    .dropdown-menu li a:hover {
        background-color: #fff;
        color: #d32f2f;
        padding-left: 45px;
    }

    .dropdown-menu li a:hover:before {
        color: #d32f2f;
        left: 28px;
    }

    .main-nav-list > li.active > .dropdown-menu,
    .main-nav-list > li.has-dropdown.active .dropdown-menu {
        display: block;
    }

    /* Improved mobile dropdown parent styling */
    .main-nav-list > li.has-dropdown.active > a {
        background-color: #f0f0f0;
        color: #d32f2f;
    }

    .main-nav-list > li.has-dropdown.active > a i {
        transform: rotate(180deg);
    }

    /* Mega menu mobile styling - ensure proper scrolling */
    .mega-menu {
        columns: 1;
        max-height: 400px;
        min-width: 100%;
        left: 0;
        transform: none !important;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }

    /* Style the mega menu scrollbar for mobile */
    .mega-menu::-webkit-scrollbar {
        width: 4px;
    }

    .mega-menu::-webkit-scrollbar-track {
        background: #e0e0e0;
    }

    .mega-menu::-webkit-scrollbar-thumb {
        background: #d32f2f;
        border-radius: 2px;
    }

    /* Hero Section */
    .hero-slider .carousel-item {
        height: 400px;
    }

    .carousel-caption {
        padding: 20px;
        width: 95%;
    }

    .carousel-caption h1 {
        font-size: 20px;
        line-height: 1.3;
    }

    .carousel-caption h2 {
        font-size: 18px;
        margin-bottom: 15px;
    }

    .btn-request-appt-large {
        padding: 12px 25px;
        font-size: 14px;
    }

    /* Quick Links */
    .quick-links {
        padding: 30px 0;
    }

    .quick-links h4 {
        margin-bottom: 15px;
        font-size: 16px;
    }

    /* Gallery */
    .gallery-section {
        padding: 30px 0;
    }

    .gallery-item img {
        height: 150px;
    }

    /* Condition Buttons */
    .condition-buttons {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }

    .condition-btn {
        padding: 15px;
    }

    .condition-btn img {
        width: 60px;
        height: 60px;
    }

    .condition-btn p {
        font-size: 14px;
    }

    /* Body Diagram */
    .body-diagram-section {
        margin-bottom: 20px;
    }

    .body-diagram-text h2 {
        font-size: 28px;
    }

    .body-diagram-text h3 {
        font-size: 18px;
    }

    .body-diagram-text p {
        font-size: 14px;
    }

    /* Testimonials */
    .testimonials-section {
        padding: 40px 0;
    }

    .testimonials-section h2 {
        font-size: 28px;
    }

    .testimonials-section h3 {
        font-size: 18px;
    }

    .testimonial-card {
        padding: 20px;
    }

    .testimonial-img {
        width: 80px;
        height: 80px;
    }

    /* Treatments */
    .how-we-treat {
        padding: 40px 0;
    }

    .treatment-card {
        margin-bottom: 20px;
    }

    .treatment-card img {
        height: 150px;
    }

    .how-we-treat h2 {
        font-size: 28px;
    }

    .how-we-treat h3 {
        font-size: 20px;
    }

    /* About Section */
    .about-section {
        padding: 40px 0;
    }

    .about-section h2 {
        font-size: 24px;
        line-height: 1.3;
    }

    .about-section h3 {
        font-size: 18px;
    }

    .about-buttons {
        flex-direction: column;
        gap: 15px;
    }

    .about-buttons a {
        width: 100%;
        text-align: center;
        padding: 12px 20px;
    }

    /* Video Section */
    .video-section {
        padding: 40px 0;
    }

    .video-section h2 {
        font-size: 24px;
    }

    /* CTA Section */
    .cta-section {
        padding: 40px 0;
    }

    .cta-section h2 {
        font-size: 24px;
    }

    .cta-section .row {
        flex-direction: column;
        text-align: center;
    }

    .cta-section .text-end {
        text-align: center !important;
        margin-top: 20px;
    }

    .phone-link-large {
        font-size: 20px;
    }

    /* Newsletter */
    .newsletter-section {
        padding: 40px 0;
    }

    .newsletter-section h3 {
        font-size: 22px;
    }

    /* Footer */
    .main-footer {
        padding: 40px 0 20px;
    }

    .footer-top .row {
        flex-direction: column;
    }

    .footer-top .col-md-3 {
        margin-bottom: 30px;
        width: 100%;
    }

    .footer-bottom .row {
        flex-direction: column;
        text-align: center;
    }

    .footer-bottom .text-end {
        text-align: center !important;
        margin-top: 20px;
    }

    /* Ensure no horizontal scroll */
    body, html {
        overflow-x: hidden;
        width: 100%;
    }

    /* Fix any elements that might cause overflow */
    .row {
        margin-left: -15px;
        margin-right: -15px;
    }

    .row > * {
        padding-left: 15px;
        padding-right: 15px;
    }
}

    /* Carousel controls for mobile */
    .carousel-control-prev,
    .carousel-control-next {
        width: 40px;
        height: 40px;
    }

    .carousel-control-prev {
        left: 10px;
    }

    .carousel-control-next {
        right: 10px;
    }
}

/* Small Mobile */
@media (max-width: 576px) {
    .top-bar {
        padding: 8px 0;
        font-size: 12px;
    }

    .main-header {
        padding: 10px 0;
    }

    .logo-img {
        max-height: 40px;
    }

    .phone-icon-mobile {
        font-size: 20px;
    }

    .header-nav-list {
        gap: 8px;
    }

    .phone-link {
        font-size: 16px;
    }

    .btn-pay-bill,
    .btn-request-appt {
        padding: 10px 15px;
        font-size: 14px;
    }

    .main-nav {
        padding: 8px 0;
    }

    .main-nav-list > li > a {
        padding: 12px 15px;
        font-size: 13px;
    }

    /* Hero */
    .hero-slider .carousel-item {
        height: 300px;
    }

    .carousel-caption {
        padding: 15px;
    }

    .carousel-caption h1 {
        font-size: 16px;
        line-height: 1.2;
    }

    .carousel-caption h2 {
        font-size: 14px;
        margin-bottom: 10px;
    }

    .btn-request-appt-large {
        padding: 10px 20px;
        font-size: 12px;
    }

    /* Quick Links */
    .quick-links {
        padding: 20px 0;
    }

    .quick-links h4 {
        font-size: 14px;
        margin-bottom: 10px;
    }

    .quick-links h4 small {
        font-size: 12px;
    }

    /* Gallery */
    .gallery-item img {
        height: 120px;
    }

    /* Condition Buttons */
    .condition-buttons {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .condition-btn {
        padding: 12px;
    }

    .condition-btn img {
        width: 50px;
        height: 50px;
    }

    .condition-btn p {
        font-size: 12px;
    }

    /* Body Diagram */
    .body-diagram-text h2 {
        font-size: 22px;
    }

    .body-diagram-text h3 {
        font-size: 16px;
    }

    .body-diagram-text p {
        font-size: 13px;
    }

    /* Testimonials */
    .testimonials-section h2 {
        font-size: 22px;
    }

    .testimonials-section h3 {
        font-size: 16px;
    }

    .testimonial-card {
        padding: 15px;
    }

    .testimonial-card h4 {
        font-size: 16px;
    }

    .testimonial-card p {
        font-size: 13px;
    }

    /* Treatments */
    .how-we-treat h2 {
        font-size: 22px;
    }

    .how-we-treat h3 {
        font-size: 18px;
    }

    .treatment-card {
        padding: 15px;
    }

    .treatment-card img {
        height: 120px;
    }

    .treatment-card h3 {
        font-size: 16px;
    }

    .treatment-card p {
        font-size: 12px;
    }

    /* About */
    .about-section h2 {
        font-size: 20px;
    }

    .about-section h3 {
        font-size: 16px;
    }

    .about-section p {
        font-size: 14px;
    }

    /* Video */
    .video-section h2 {
        font-size: 20px;
    }

    .btn-order-book {
        padding: 12px 25px;
        font-size: 14px;
    }

    /* CTA */
    .cta-section h2 {
        font-size: 20px;
    }

    .phone-link-large {
        font-size: 18px;
    }

    /* Newsletter */
    .newsletter-section h3 {
        font-size: 18px;
    }

    .form-control {
        padding: 10px 12px;
        font-size: 14px;
    }

    .btn-subscribe {
        padding: 10px 20px;
        font-size: 14px;
    }

    /* Footer */
    .footer-top h3,
    .footer-top h2 {
        font-size: 16px;
    }

    .footer-top p {
        font-size: 13px;
    }

    .footer-nav li a {
        font-size: 13px;
    }

    .social-links li a {
        width: 35px;
        height: 35px;
        font-size: 18px;
    }

    /* Carousel controls for small mobile */
    .carousel-control-prev,
    .carousel-control-next {
        width: 35px;
        height: 35px;
    }

    .carousel-control-prev {
        left: 5px;
    }

    .carousel-control-next {
        right: 5px;
    }

    /* Touch-friendly buttons */
    button, .btn-pay-bill, .btn-request-appt, .btn-request-appt-large {
        min-height: 44px;
        min-width: 44px;
    }
}

/* Extra small devices */
@media (max-width: 400px) {
    .container {
        padding-left: 10px;
        padding-right: 10px;
    }

    .carousel-caption h1 {
        font-size: 14px;
    }

    .carousel-caption h2 {
        font-size: 12px;
    }

    .btn-request-appt-large {
        padding: 8px 15px;
        font-size: 11px;
    }
}

/* ==========================
   Sitemap Page Styles
   ========================== */
.sitemap-container {
    padding: 20px 0;
}

.sitemap-section {
    margin-bottom: 40px;
}

.sitemap-section h2 {
    color: #00539f;
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #f0f0f0;
}

.sitemap-list {
    list-style: none;
    padding: 0;
    margin: 0;
    column-count: 2;
    column-gap: 30px;
}

.sitemap-list li {
    margin-bottom: 12px;
    break-inside: avoid;
}

.sitemap-list li a {
    color: #333;
    text-decoration: none;
    transition: color 0.3s ease;
    display: inline-block;
    position: relative;
    padding-left: 20px;
}

.sitemap-list li a:before {
    content: "\f054";
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    position: absolute;
    left: 0;
    color: #00539f;
    font-size: 12px;
}

.sitemap-list li a:hover {
    color: #00539f;
}

/* ==========================
   Privacy Policy & Terms Styles
   ========================== */
.privacy-content,
.terms-content {
    padding: 20px 0;
}

.last-updated {
    font-size: 14px;
    color: #666;
    font-style: italic;
    margin-bottom: 30px;
    padding: 15px;
    background-color: #f8f9fa;
    border-left: 4px solid #00539f;
}

.privacy-section,
.terms-section {
    margin-bottom: 40px;
}

.privacy-section h2,
.terms-section h2 {
    color: #00539f;
    font-size: 26px;
    font-weight: 700;
    margin-bottom: 20px;
    margin-top: 30px;
}

.privacy-section h3,
.terms-section h3 {
    color: #333;
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 15px;
    margin-top: 25px;
}

.privacy-section p,
.terms-section p {
    color: #555;
    line-height: 1.8;
    margin-bottom: 15px;
    font-size: 16px;
}

.privacy-section ul,
.terms-section ul {
    margin-bottom: 20px;
    padding-left: 30px;
}

.privacy-section ul li,
.terms-section ul li {
    color: #555;
    line-height: 1.8;
    margin-bottom: 10px;
    font-size: 16px;
}

.privacy-section a,
.terms-section a {
    color: #00539f;
    text-decoration: none;
    transition: color 0.3s ease;
}

.privacy-section a:hover,
.terms-section a:hover {
    color: #003d73;
    text-decoration: underline;
}

.contact-info {
    background-color: #f8f9fa;
    padding: 25px;
    border-radius: 8px;
    margin-top: 20px;
    border-left: 4px solid #00539f;
}

.contact-info p {
    margin-bottom: 8px;
}

.contact-info strong {
    color: #00539f;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .sitemap-list {
        column-count: 1;
    }
    
    .privacy-section h2,
    .terms-section h2 {
        font-size: 22px;
    }
    
    .privacy-section h3,
    .terms-section h3 {
        font-size: 18px;
    }
    
    .privacy-section p,
    .terms-section p,
    .privacy-section ul li,
    .terms-section ul li {
        font-size: 15px;
    }
}
