/* ========== MEDICAL BILLING SERVICES STYLES ========== */

/* Hero Section */
.hero-section {
    min-height: 100vh;
    background: linear-gradient(135deg, rgba(95, 17, 79, 0.85), rgba(43, 0, 75, 0.85)), url('images/background2.webp') center/cover no-repeat;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: white;
    position: relative;
    overflow: hidden;
    padding: 80px 20px 40px;
}

.hero-content {
    max-width: 800px;
    width: 100%;
    z-index: 2;
    position: relative;
}

.hero-title {
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 800;
    margin-bottom: 20px;
    line-height: 1.2;
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUp 1s forwards 0.5s;
}

.hero-subtitle {
    font-size: clamp(1.1rem, 2.5vw, 1.5rem);
    margin-bottom: 30px;
    line-height: 1.6;
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUp 1s forwards 0.8s;
}

.hero-button {
    display: inline-block;
    padding: clamp(12px, 3vw, 15px) clamp(30px, 5vw, 40px);
    background: linear-gradient(135deg, #e91e63, #5f114f);
    color: white;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    font-size: clamp(1rem, 2vw, 1.1rem);
    box-shadow: 0 10px 30px rgba(233, 30, 99, 0.4);
    transition: all 0.3s ease;
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUp 1s forwards 1.1s;
}

.hero-button:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(233, 30, 99, 0.6);
}

.floating-shapes {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    z-index: 1;
}

.shape {
    position: absolute;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    animation: float 6s ease-in-out infinite;
}

.shape:nth-child(1) {
    width: 60px;
    height: 60px;
    top: 15%;
    left: 5%;
    animation-delay: 0s;
}

.shape:nth-child(2) {
    width: 90px;
    height: 90px;
    top: 65%;
    left: 85%;
    animation-delay: 1s;
}

.shape:nth-child(3) {
    width: 40px;
    height: 40px;
    top: 75%;
    left: 10%;
    animation-delay: 2s;
}

.shape:nth-child(4) {
    width: 70px;
    height: 70px;
    top: 25%;
    left: 80%;
    animation-delay: 3s;
}

/* ========== SERVICES GRID ========== */
.services-section {
    padding: clamp(60px, 8vw, 100px) 20px;
    background: #f8fbff;
}

.section-title {
    text-align: center;
    font-size: clamp(2rem, 4vw, 2.8rem);
    font-weight: 700;
    color: #5f114f;
    margin-bottom: 15px;
    line-height: 1.2;
    opacity: 0;
    transform: translateY(30px);
}

.section-subtitle {
    text-align: center;
    font-size: clamp(1rem, 2vw, 1.2rem);
    color: #666;
    max-width: 700px;
    margin: 0 auto clamp(40px, 6vw, 60px);
    line-height: 1.6;
    opacity: 0;
    transform: translateY(30px);
    padding: 0 20px;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr));
    gap: clamp(20px, 3vw, 30px);
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.service-card {
    background: white;
    border-radius: 15px;
    padding: clamp(25px, 4vw, 40px) clamp(20px, 3vw, 30px);
    text-align: center;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    transition: all 0.4s ease;
    opacity: 0;
    transform: translateY(40px);
    position: relative;
    overflow: hidden;
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 5px;
    background: linear-gradient(90deg, #5f114f, #e91e63);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.4s ease;
}

.service-card:hover::before {
    transform: scaleX(1);
}

.service-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

.service-icon {
    width: clamp(60px, 10vw, 80px);
    height: clamp(60px, 10vw, 80px);
    margin: 0 auto clamp(15px, 3vw, 25px);
    background: linear-gradient(135deg, #5f114f, #e91e63);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: clamp(1.5rem, 3vw, 2rem);
}

.service-title {
    font-size: clamp(1.2rem, 2.5vw, 1.5rem);
    font-weight: 600;
    margin-bottom: clamp(10px, 2vw, 15px);
    color: #333;
    line-height: 1.3;
}

.service-description {
    color: #666;
    margin-bottom: clamp(15px, 3vw, 20px);
    line-height: 1.6;
    font-size: clamp(0.9rem, 1.5vw, 1rem);
}

.service-link {
    color: #5f114f;
    font-weight: 600;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    transition: all 0.3s ease;
    font-size: clamp(0.9rem, 1.5vw, 1rem);
}

.service-link:hover {
    gap: 10px;
    color: #e91e63;
}

/* ========== FEATURES SECTION ========== */
.features-section {
    padding: clamp(60px, 8vw, 100px) 20px;
    background: white;
}

.features-container {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr;
    gap: clamp(40px, 6vw, 60px);
    align-items: center;
    padding: 0 20px;
}

.features-content {
    opacity: 0;
    transform: translateX(-50px);
    order: 2;
}

.features-title {
    font-size: clamp(2rem, 4vw, 2.8rem);
    font-weight: 700;
    color: #5f114f;
    margin-bottom: 20px;
    line-height: 1.2;
}

.features-description {
    font-size: clamp(1rem, 2vw, 1.1rem);
    color: #666;
    margin-bottom: 30px;
    line-height: 1.7;
}

.features-list {
    list-style: none;
}

.features-list li {
    margin-bottom: clamp(12px, 2vw, 15px);
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.features-list i {
    color: #5f114f;
    margin-top: 3px;
    flex-shrink: 0;
    font-size: clamp(1rem, 2vw, 1.1rem);
}

.features-list span {
    line-height: 1.6;
    font-size: clamp(0.9rem, 1.5vw, 1rem);
}

.features-image {
    opacity: 0;
    transform: translateX(50px);
    position: relative;
    order: 1;
    text-align: center;
}

.features-image img {
    width: 100%;
    max-width: 500px;
    border-radius: 15px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    margin: 0 auto;
}

.floating-card {
    position: absolute;
    background: white;
    padding: clamp(15px, 2vw, 20px);
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    gap: clamp(10px, 2vw, 15px);
    opacity: 0;
    animation: floatIn 1s forwards;
    max-width: 250px;
}

.floating-card:nth-child(1) {
    top: 10%;
    right: -5%;
    animation-delay: 1.5s;
}

.floating-card:nth-child(2) {
    bottom: 15%;
    left: -5%;
    animation-delay: 2s;
}

.floating-card-icon {
    width: clamp(40px, 8vw, 50px);
    height: clamp(40px, 8vw, 50px);
    background: linear-gradient(135deg, #5f114f, #e91e63);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: clamp(1rem, 2vw, 1.2rem);
    flex-shrink: 0;
}

.floating-card h4 {
    font-size: clamp(0.9rem, 1.8vw, 1rem);
    font-weight: 600;
    margin-bottom: 5px;
    color: #333;
}

.floating-card p {
    font-size: clamp(0.8rem, 1.5vw, 0.9rem);
    color: #666;
}

/* ========== STATS SECTION ========== */
.stats-section {
    padding: clamp(60px, 8vw, 100px) 20px;
    background: linear-gradient(135deg, #5f114f, #a92c94);
    color: white;
    text-align: center;
}

.stats-container {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr));
    gap: clamp(30px, 4vw, 40px);
    padding: 0 20px;
}

.stat-item {
    opacity: 0;
    transform: translateY(30px);
}

.stat-number {
    font-size: clamp(2.5rem, 6vw, 4rem);
    font-weight: 800;
    margin-bottom: 10px;
    background: linear-gradient(90deg, #fff, #e69aff);
    background-clip: text;
    -webkit-text-fill-color: transparent;
    line-height: 1;
}

.stat-label {
    font-size: clamp(1rem, 2vw, 1.2rem);
    font-weight: 600;
    line-height: 1.3;
}

/* ========== TESTIMONIALS SECTION ========== */
.testimonials-section {
    padding: clamp(60px, 8vw, 100px) 20px;
    background: #f8fbff;
}

.testimonials-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.testimonials-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 350px), 1fr));
    gap: clamp(25px, 4vw, 30px);
}

.testimonial-card {
    background: white;
    border-radius: 15px;
    padding: clamp(25px, 4vw, 30px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    opacity: 0;
    transform: translateY(40px);
    transition: all 0.4s ease;
    position: relative;
}

.testimonial-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

.testimonial-card::before {
    content: "\201C";
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: clamp(3rem, 6vw, 5rem);
    color: #f0f0f0;
    font-family: Georgia, serif;
    line-height: 1;
}

.testimonial-content {
    margin-bottom: clamp(15px, 3vw, 20px);
    font-style: italic;
    color: #555;
    line-height: 1.7;
    font-size: clamp(0.9rem, 1.5vw, 1rem);
}

.testimonial-author {
    display: flex;
    align-items: center;
    gap: clamp(12px, 2vw, 15px);
}

.author-avatar {
    width: clamp(50px, 8vw, 60px);
    height: clamp(50px, 8vw, 60px);
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

.author-info h4 {
    font-weight: 600;
    color: #333;
    margin-bottom: 5px;
    font-size: clamp(0.9rem, 1.8vw, 1rem);
}

.author-info p {
    color: #666;
    font-size: clamp(0.8rem, 1.5vw, 0.9rem);
}

/* ========== CTA SECTION ========== */
.cta-section {
    padding: clamp(60px, 8vw, 100px) 20px;
    background: linear-gradient(135deg, rgba(95, 17, 79, 0.9), rgba(43, 0, 75, 0.9)), url('images/background2.webp') center/cover no-repeat;
    color: white;
    text-align: center;
}

.cta-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 20px;
}

.cta-title {
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 700;
    margin-bottom: 20px;
    line-height: 1.2;
    opacity: 0;
    transform: translateY(30px);
}

.cta-description {
    font-size: clamp(1rem, 2vw, 1.2rem);
    margin-bottom: clamp(30px, 5vw, 40px);
    line-height: 1.6;
    opacity: 0;
    transform: translateY(30px);
}

.cta-buttons {
    display: flex;
    gap: clamp(15px, 3vw, 20px);
    justify-content: center;
    flex-wrap: wrap;
}

.cta-button {
    padding: clamp(12px, 3vw, 15px) clamp(30px, 5vw, 40px);
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    font-size: clamp(1rem, 2vw, 1.1rem);
    transition: all 0.3s ease;
    opacity: 0;
    transform: translateY(30px);
    text-align: center;
    min-width: min(100%, 200px);
}

.cta-button.primary {
    background: white;
    color: #5f114f;
}

.cta-button.secondary {
    background: transparent;
    color: white;
    border: 2px solid white;
}

.cta-button:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}

/* ========== ANIMATIONS ========== */
@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes float {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-15px);
    }
}

@keyframes floatIn {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ========== SCROLL ANIMATIONS ========== */
.animate-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s ease;
}

.animate-on-scroll.animated {
    opacity: 1;
    transform: translateY(0);
}

.animate-left {
    transform: translateX(-50px);
}

.animate-right {
    transform: translateX(50px);
}

.animate-left.animated, .animate-right.animated {
    transform: translateX(0);
}

/* ========== COMPREHENSIVE RESPONSIVE BREAKPOINTS ========== */

/* Extra Small Devices (Phones, 320px - 575px) */
@media (max-width: 575px) {
    .hero-section {
        padding: 70px 15px 30px;
        min-height: 80vh;
    }
    
    .services-section,
    .features-section,
    .stats-section,
    .testimonials-section,
    .cta-section {
        padding: 50px 15px;
    }
    
    .services-grid,
    .testimonials-grid {
        gap: 20px;
        padding: 0 15px;
    }
    
    .service-card,
    .testimonial-card {
        padding: 25px 20px;
    }
    
    .floating-shapes .shape {
        display: none;
    }
    
    .floating-card {
        position: relative;
        margin: 15px 0;
        left: auto !important;
        right: auto !important;
        top: auto !important;
        bottom: auto !important;
        max-width: 100%;
    }
    
    .testimonial-author {
        flex-direction: column;
        text-align: center;
        gap: 10px;
    }
    
    .author-avatar {
        width: 70px;
        height: 70px;
    }
    
    .stats-container {
        grid-template-columns: repeat(2, 1fr);
        gap: 25px;
    }
    
    .cta-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .cta-button {
        width: 100%;
        max-width: 280px;
    }
}

/* Small Devices (Phones, 576px - 767px) */
@media (min-width: 576px) and (max-width: 767px) {
    .hero-section {
        padding: 80px 20px 40px;
    }
    
    .services-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .testimonials-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .stats-container {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .features-container {
        padding: 0 30px;
    }
    
    .floating-card {
        max-width: 220px;
    }
    
    .floating-card:nth-child(1) {
        right: -3%;
    }
    
    .floating-card:nth-child(2) {
        left: -3%;
    }
}

/* Medium Devices (Tablets, 768px - 991px) */
@media (min-width: 768px) and (max-width: 991px) {
    .hero-section {
        padding: 100px 40px 60px;
    }
    
    .services-section,
    .features-section,
    .stats-section,
    .testimonials-section,
    .cta-section {
        padding: 80px 30px;
    }
    
    .features-container {
        grid-template-columns: 1fr 1fr;
        gap: 50px;
        padding: 0 30px;
    }
    
    .features-content {
        order: 1;
    }
    
    .features-image {
        order: 2;
    }
    
    .floating-card:nth-child(1) {
        top: 8%;
        right: -8%;
    }
    
    .floating-card:nth-child(2) {
        bottom: 15%;
        left: -8%;
    }
    
    .services-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 25px;
    }
    
    .testimonials-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 25px;
    }
    
    .stats-container {
        grid-template-columns: repeat(4, 1fr);
        gap: 30px;
    }
    
    .cta-buttons {
        flex-direction: row;
    }
    
    .section-title {
        font-size: clamp(2.2rem, 4vw, 2.6rem);
    }
}

/* Large Devices (Desktops, 992px - 1199px) */
@media (min-width: 992px) and (max-width: 1199px) {
    .hero-section {
        padding: 120px 50px 80px;
    }
    
    .services-section,
    .features-section,
    .stats-section,
    .testimonials-section,
    .cta-section {
        padding: 90px 40px;
    }
    
    .features-container {
        grid-template-columns: 1fr 1fr;
        gap: 60px;
        padding: 0 40px;
    }
    
    .services-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 30px;
    }
    
    .testimonials-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 30px;
    }
    
    .stats-container {
        grid-template-columns: repeat(4, 1fr);
        gap: 35px;
    }
    
    .floating-card:nth-child(1) {
        top: 10%;
        right: -10%;
    }
    
    .floating-card:nth-child(2) {
        bottom: 20%;
        left: -10%;
    }
    
    .hero-title {
        font-size: 3.5rem;
    }
    
    .section-title {
        font-size: 2.6rem;
    }
}

/* Extra Large Devices (Large Desktops, 1200px and up) */
@media (min-width: 1200px) {
    .hero-section {
        padding: 140px 60px 100px;
    }
    
    .services-section,
    .features-section,
    .stats-section,
    .testimonials-section,
    .cta-section {
        padding: 100px 50px;
    }
    
    .features-container {
        grid-template-columns: 1fr 1fr;
        gap: 80px;
        padding: 0 50px;
    }
    
    .services-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 35px;
    }
    
    .testimonials-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 35px;
    }
    
    .stats-container {
        grid-template-columns: repeat(4, 1fr);
        gap: 40px;
    }
    
    .floating-card:nth-child(1) {
        top: 12%;
        right: -12%;
    }
    
    .floating-card:nth-child(2) {
        bottom: 22%;
        left: -12%;
    }
}

/* Special Breakpoints for Specific Layout Adjustments */

/* Tablet Landscape and Small Laptops */
@media (min-width: 768px) and (max-width: 1024px) and (orientation: landscape) {
    .hero-section {
        min-height: 100vh;
        padding: 100px 40px 60px;
    }
    
    .hero-title {
        font-size: 3rem;
    }
    
    .services-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* High DPI Screens */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .hero-button,
    .cta-button {
        border-width: 2px;
    }
}

/* Reduced Motion Support */
@media (prefers-reduced-motion: reduce) {
    .animate-on-scroll,
    .hero-title,
    .hero-subtitle,
    .hero-button,
    .floating-card,
    .shape {
        animation: none;
        transition: none;
        opacity: 1;
        transform: none;
    }
    
    .service-card:hover,
    .testimonial-card:hover,
    .cta-button:hover {
        transform: none;
    }
}

/* Touch Device Optimizations */
@media (hover: none) and (pointer: coarse) {
    .service-card:hover,
    .testimonial-card:hover,
    .cta-button:hover {
        transform: none;
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    }
    
    .service-link:hover {
        gap: 5px;
    }
    
    .floating-card {
        animation: none;
        opacity: 1;
    }
}

/* Landscape Mobile Optimization */
@media (max-height: 500px) and (orientation: landscape) {
    .hero-section {
        min-height: 120vh;
        padding: 100px 20px 60px;
    }
    
    .hero-title {
        font-size: 2.5rem;
    }
    
    .hero-subtitle {
        font-size: 1.1rem;
        margin-bottom: 20px;
    }
    
    .panel-content {
        max-height: 60vh;
    }
}

/* Very Small Screens (Old Android Devices) */
@media (max-width: 360px) and (max-height: 640px) {
    .hero-section {
        min-height: 90vh;
        padding: 60px 15px 30px;
    }
    
    .hero-title {
        font-size: 2rem;
    }
    
    .hero-subtitle {
        font-size: 1rem;
    }
    
    .services-grid {
        grid-template-columns: 1fr;
    }
    
    .stats-container {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
    
    .stat-number {
        font-size: 2.2rem;
    }
    
    .stat-label {
        font-size: 0.9rem;
    }
}

/* Ultra-wide Screens */
@media (min-width: 1600px) {
    .services-grid {
        grid-template-columns: repeat(4, 1fr);
        max-width: 1400px;
    }
    
    .testimonials-grid {
        grid-template-columns: repeat(4, 1fr);
        max-width: 1400px;
    }
    
    .features-container {
        max-width: 1400px;
    }
}

/* Print Styles */
@media print {
    .hero-section {
        background: #5f114f !important;
        color: #000 !important;
        min-height: auto;
        padding: 50px 20px !important;
    }
    
    .hero-button,
    .cta-button {
        display: none;
    }
    
    .floating-shapes {
        display: none;
    }
    
    .service-card:hover,
    .testimonial-card:hover {
        transform: none;
        box-shadow: none;
    }
}

/* Safe Area Insets for Notch Phones */
@supports (padding: max(0px)) {
    .hero-section {
        padding-left: max(20px, env(safe-area-inset-left));
        padding-right: max(20px, env(safe-area-inset-right));
        padding-top: max(80px, env(safe-area-inset-top));
    }
    
    @media (max-width: 575px) {
        .hero-section {
            padding-left: max(15px, env(safe-area-inset-left));
            padding-right: max(15px, env(safe-area-inset-right));
        }
    }
}