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

*,
*::before,
*::after {
    box-sizing: border-box;
}

html,
body {
    max-width: 100%;
    overflow-x: hidden;
}

:root {
    --primary-color: #c41e3a;
    --secondary-color: #e85d75;
    --text-dark: #333333;
    --text-light: #666666;
    --bg-light: #fafbfc;
    --bg-lighter: #f5f7f9;
    --white: #ffffff;
    --shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    --shadow-hover: 0 5px 20px rgba(196, 30, 58, 0.15);
}

body {
    font-family: 'Poppins', sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    overflow-x: hidden;
    width: 100%;
    max-width: 100vw;
}

html {
    overflow-x: hidden;
    width: 100%;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    width: 100%;
    box-sizing: border-box;
}

/* Navigation */
.navbar {
    background: var(--white);
    box-shadow: var(--shadow);
    position: fixed;
    width: 100%;
    max-width: 100vw;
    height: auto;
    min-height: 80px;
    top: 0px;
    z-index: 1000;
    transition: transform 0.3s ease;
    left: 0;
    right: 0;
}

.navbar-hide {
    transform: translateY(-100%);
}

.nav-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
}

.logo img {
    max-width: 150px;
    height: auto;
    display: block;
    margin: 0 auto;
    border: none !important;
}

@media (max-width: 768px) {
    .logo img {
        max-width: 100px;
    }
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-link {
    text-decoration: none;
    color: var(--text-dark);
    font-weight: 500;
    transition: color 0.3s ease;
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary-color);
    transition: width 0.3s ease;
}

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

.nav-link:hover::after {
    width: 100%;
}

.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
    gap: 5px;
}

.hamburger span {
    width: 25px;
    height: 3px;
    background: var(--primary-color);
    transition: all 0.3s ease;
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    color: var(--text-dark);
    padding: 150px 0 100px;
    margin-top: 80px;
    text-align: center;
    position: relative;
    overflow: hidden;
    border-bottom: 3px solid var(--primary-color);
    width: 100%;
    max-width: 100vw;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1200 120"><path d="M0,0 Q300,60 600,30 T1200,0 L1200,120 L0,120 Z" fill="rgba(255,255,255,0.05)"/></svg>');
    background-size: cover;
    background-position: bottom;
}

.hero-content {
    position: relative;
    z-index: 1;
}

.hero-logo {
    margin-bottom: 30px;
    width: 100%;
    display: flex;
    justify-content: center;
}

.hero-logo img {
    max-width: 200px;
    width: 100%;
    height: auto;
    display: block;
    border: none !important;
}

.hero h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
    font-weight: 700;
    color: var(--text-dark);
    word-wrap: break-word;
    max-width: 100%;
}

.hero p {
    font-size: 1.3rem;
    margin-bottom: 2rem;
    color: var(--text-light);
}

.btn {
    display: inline-block;
    padding: 12px 35px;
    text-decoration: none;
    border-radius: 50px;
    transition: all 0.3s ease;
    font-weight: 600;
    border: none;
    cursor: pointer;
    font-size: 1rem;
}

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

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(196, 30, 58, 0.3);
    background: var(--secondary-color);
}

/* Animations */
.fade-in {
    animation: fadeIn 1s ease-in;
}

.fade-in-delay {
    animation: fadeIn 1s ease-in 0.3s both;
}

.fade-in-delay-2 {
    animation: fadeIn 1s ease-in 0.6s both;
}

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

/* Section Styling */
section {
    padding: 80px 0;
    width: 100%;
    max-width: 100vw;
    overflow-x: hidden;
}

.section-header {
    text-align: center;
    margin-bottom: 50px;
}

.section-header h2 {
    font-size: 2.5rem;
    color: var(--text-dark);
    margin-bottom: 15px;
}

.section-header p {
    color: var(--text-light);
    font-size: 1.1rem;
}

.underline {
    width: 80px;
    height: 4px;
    background: var(--primary-color);
    margin: 0 auto 20px;
    border-radius: 2px;
}

/* About Section */
.about {
    background: var(--white);
}

.about-content {
    max-width: 1000px;
    margin: 0 auto;
}

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

.about-text p {
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--text-light);
    margin-bottom: 20px;
}

.about-features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 30px;
    margin-top: 50px;
}

.feature-item {
    background: var(--white);
    padding: 30px;
    border-radius: 10px;
    text-align: center;
    box-shadow: var(--shadow);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid #f0f2f4;
}

.feature-item:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-hover);
}

.feature-icon {
    font-size: 3rem;
    margin-bottom: 15px;
}

.feature-icon img {
    width: 2em;
    height: 1em;
    object-fit: contain;
    margin-bottom: 0;
}

.feature-item h4 {
    color: var(--primary-color);
    margin-bottom: 10px;
    font-size: 1.2rem;
}

.feature-item p {
    color: var(--text-light);
    font-size: 0.95rem;
}

/* Doctors Section */
.doctors {
    background: var(--bg-lighter);
}

.doctors-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 30px;
}

.doctor-card {
    flex: 0 1 280px;
    max-width: 280px;
    background: var(--white);
    border-radius: 15px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid #f0f2f4;
}

.doctor-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-hover);
    
}

.doctor-image {
    background: linear-gradient(135deg, #fef5f7 0%, #ffe6eb 100%);
    height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-bottom: 3px solid var(--primary-color);
}

.doctor-placeholder {
    font-size: 5rem;
    color: var(--primary-color);
}

.doctor-info {
    padding: 25px;
    text-align: center;
}

.doctor-info h3 {
    color: var(--text-dark);
    margin-bottom: 10px;
    font-size: 1.3rem;
}

.specialty {
    color: var(--primary-color);
    font-weight: 600;
    margin-bottom: 8px;
    font-size: 1rem;
}

.qualification {
    color: var(--text-light);
    font-size: 0.9rem;
    margin-bottom: 5px;
}

.experience {
    color: var(--text-light);
    font-size: 0.9rem;
    font-style: italic;
}

/* Testimonials Section */
.testimonials {
    background: var(--white);
}

.testimonial-slider {
    max-width: 800px;
    margin: 0 auto;
    position: relative;
}

.testimonial-container {
    position: relative;
    min-height: 300px;
}

.testimonial-card {
    background: var(--white);
    padding: 40px;
    border-radius: 15px;
    box-shadow: var(--shadow);
    position: absolute;
    width: 100%;
    opacity: 0;
    transform: translateX(100px);
    transition: all 0.5s ease;
    pointer-events: none;
    border: 1px solid #f0f2f4;
}

.testimonial-card.active {
    opacity: 1;
    transform: translateX(0);
    pointer-events: all;
}

.stars {
    color: #ffc107;
    font-size: 1.5rem;
    margin-bottom: 20px;
}

.testimonial-text {
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--text-light);
    margin-bottom: 25px;
    font-style: italic;
}

.patient-info h4 {
    color: var(--primary-color);
    font-size: 1.2rem;
    margin-bottom: 5px;
}

.patient-info p {
    color: var(--text-light);
}

.slider-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    margin-top: 350px;
}

.slider-btn {
    background: var(--primary-color);
    color: var(--white);
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    font-size: 1.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.slider-btn:hover {
    background: var(--secondary-color);
    transform: scale(1.1);
}

.slider-dots {
    display: flex;
    gap: 10px;
}

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

.dot.active {
    background: var(--primary-color);
    width: 30px;
    border-radius: 6px;
}

/* Contact Section */
.contact {
    background: var(--bg-lighter);
}

.contact-content {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 50px;
}

.contact-info {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.info-item h3 {
    color: var(--primary-color);
    margin-bottom: 10px;
    font-size: 1.3rem;
}

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

.contact-form {
    background: var(--white);
    padding: 40px;
    border-radius: 15px;
    box-shadow: var(--shadow);
    border: 1px solid #eef0f2;
}

.contact-form input,
.contact-form select,
.contact-form textarea {
    width: 100%;
    padding: 15px;
    margin-bottom: 20px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-family: 'Poppins', sans-serif;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.contact-form input:focus,
.contact-form select:focus,
.contact-form textarea:focus {
    outline: none;
    border-color: var(--primary-color);
}

.contact-form button {
    width: 100%;
}

/* Footer */
.footer {
    background: #2d3436;
    color: var(--white);
    padding: 50px 0 20px;
}

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

.footer-section h3 {
    color: var(--primary-color);
    margin-bottom: 20px;
}

.footer-section p {
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.8;
}

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

.footer-section ul li {
    margin-bottom: 10px;
}

.footer-section ul li a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-section ul li a:hover {
    color: var(--primary-color);
}

.footer-logo {
    height: 100px;
    margin-bottom: 20px;
}

.social-links {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.social-icon {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    transition: color 0.3s ease;
}

.social-icon:hover {
    color: var(--primary-color);
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.5);
}

/* Responsive Design */
@media (max-width: 768px) {
    .hamburger {
        display: flex;
    }

    .nav-menu {
        position: fixed;
        left: -100%;
        top: 80px;
        flex-direction: column;
        background: var(--white);
        width: 100%;
        max-width: 100vw;
        text-align: center;
        transition: 0.3s;
        box-shadow: var(--shadow);
        padding: 20px 0;
        gap: 0.5rem;
    }

    .nav-menu.active {
        left: 0;
    }

    .container {
        padding: 0 15px;
    }

    .hero {
        padding: 100px 0 60px;
        margin-top: 80px;
    }

    .hero h1 {
        font-size: 1.8rem;
        line-height: 1.3;
        padding: 0 10px;
    }

    .hero p {
        font-size: 1rem;
        padding: 0 10px;
    }

    .hero-logo img {
        max-width: 150px;
    }

    .section-header h2 {
        font-size: 1.8rem;
    }

    section {
        padding: 50px 0;
    }

    .about-text h3 {
        font-size: 1.5rem;
    }

    .about-text p {
        font-size: 1rem;
    }

    .doctors-grid {
        grid-template-columns: 1fr;
    }

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

    .about-features {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .feature-item {
        padding: 20px;
    }

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

    .testimonial-card {
        padding: 30px 20px;
    }

    .slider-controls {
        margin-top: 320px;
    }

    .btn {
        padding: 12px 30px;
        font-size: 0.95rem;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 12px;
    }

    .hero {
        padding: 90px 0 50px;
        margin-top: 80px;
    }

    .hero h1 {
        font-size: 1.4rem;
        line-height: 1.3;
        padding: 0 5px;
    }

    .hero p {
        font-size: 0.9rem;
        padding: 0 5px;
    }

    .hero-logo img {
        max-width: 120px;
    }

    .section-header h2 {
        font-size: 1.5rem;
    }

    .about-text h3 {
        font-size: 1.25rem;
    }

    .contact-form {
        padding: 20px;
    }

    .testimonial-card {
        padding: 20px 15px;
    }

    .testimonial-text {
        font-size: 0.95rem;
    }

    .slider-controls {
        margin-top: 280px;
    }

    .slider-btn {
        width: 40px;
        height: 40px;
        font-size: 1.2rem;
    }

    .btn {
        padding: 10px 25px;
        font-size: 0.9rem;
    }

    .feature-icon {
        font-size: 2.5rem;
    }

    .doctor-card {
        max-width: 100%;
    }

    .info-item h3 {
        font-size: 1.1rem;
    }

    .info-item p {
        font-size: 0.9rem;
    }
}

/* Medium tablets */
@media (min-width: 481px) and (max-width: 768px) {
    .about-features {
        grid-template-columns: repeat(2, 1fr);
    }

    .hero h1 {
        font-size: 2.2rem;
    }

    .contact-content {
        gap: 30px;
    }
}
