/* Professional Responsive Design for O&M Page */

/* Tablet Styles (1024px and down) */
@media screen and (max-width: 1024px) {
    :root {
        --font-size-5xl: clamp(2rem, 4vw, 2.5rem);
        --font-size-4xl: clamp(1.75rem, 3.5vw, 2.25rem);
        --font-size-3xl: clamp(1.5rem, 3vw, 1.875rem);
        --space-3xl: 3rem;
        --space-2xl: 2.5rem;
    }

    .hero-section {
        min-height: 550px;
        padding-top: 140px;
    }

    .floating-shape {
        opacity: 0.6;
    }

    .shape-2 {
        width: 100px;
        height: 100px;
    }

    .shape-1, .shape-4 {
        width: 70px;
        height: 70px;
    }

    .icon-float {
        font-size: 1.5rem;
    }

    .services-section {
        padding: 4rem 0;
    }

    .service-card {
        min-height: 320px;
        padding: 1.5rem;
    }

    .why-choose-card {
        padding: 2.5rem;
        margin: 3rem auto;
    }

    .cta-section {
        padding: 3rem 0;
    }

    .cta-shape-2 {
        width: 120px;
        height: 120px;
    }
}

/* Mobile Landscape and Small Tablets (768px and down) */
@media screen and (max-width: 768px) {
    :root {
        --font-size-5xl: clamp(1.75rem, 5vw, 2rem);
        --font-size-4xl: clamp(1.5rem, 4vw, 1.75rem);
        --font-size-3xl: clamp(1.25rem, 3.5vw, 1.5rem);
        --font-size-2xl: clamp(1.125rem, 3vw, 1.25rem);
        --font-size-xl: clamp(1rem, 2.5vw, 1.125rem);
        --space-3xl: 2.5rem;
        --space-2xl: 2rem;
    }

    .hero-section {
        min-height: 500px;
        padding-top: 120px;
        text-align: center;
    }

    .hero-title {
        font-size: var(--font-size-4xl);
        margin-bottom: 1rem;
    }

    .hero-subtitle {
        font-size: var(--font-size-lg);
        margin-bottom: 1.5rem;
        max-width: 90%;
        margin-left: auto;
        margin-right: auto;
    }

    .top-badge {
        padding: 0.6rem 1.5rem;
        font-size: var(--font-size-xs);
    }

    /* Hide some floating shapes on mobile */
    .shape-3, .shape-4 {
        display: none;
    }

    .icon-float:nth-child(4), .icon-float:nth-child(5) {
        display: none;
    }

    /* Services Section Mobile */
    .services-section {
        padding: 3rem 0;
    }

    .badge-accent {
        padding: 0.6rem 1.25rem;
        font-size: var(--font-size-xs);
    }

    .gradient-heading-alt {
        font-size: var(--font-size-3xl);
        text-align: center;
    }

    .services-section .container .text-lg {
        font-size: var(--font-size-base);
        text-align: center;
        max-width: 90%;
    }

    /* Service Cards Mobile Grid */
    .grid.grid-cols-1.md\\:grid-cols-3 {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .service-card {
        min-height: 280px;
        padding: 1.25rem;
        margin-bottom: 1rem;
    }

    .service-card h3 {
        font-size: var(--font-size-lg);
        margin-bottom: 1rem;
    }

    .icon-circle {
        width: 50px;
        height: 50px;
        margin-bottom: 1rem;
    }

    .service-card ul li {
        padding: 0.5rem;
        font-size: var(--font-size-sm);
        margin-bottom: 0.75rem;
    }

    /* Why Choose Card Mobile */
    .why-choose-card {
        padding: 2rem;
        margin: 2.5rem auto;
        border-radius: 20px;
    }

    .why-choose-card h3 {
        font-size: var(--font-size-2xl);
        margin-bottom: 0.75rem;
    }

    .why-choose-card .grid.md\\:grid-cols-2 {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .why-choose-item {
        padding: 1rem;
    }

    .why-choose-item h4 {
        font-size: var(--font-size-lg);
        margin-bottom: 0.5rem;
    }

    .check-icon-container {
        width: 40px;
        height: 40px;
        margin-right: 0.75rem;
    }

    .check-icon-container i {
        font-size: 1.4rem !important;
    }

    /* CTA Section Mobile */
    .cta-section {
        padding: 2.5rem 0;
    }

    .cta-content h2 {
        font-size: var(--font-size-3xl);
    }

    .cta-content p {
        font-size: var(--font-size-lg);
        max-width: 90%;
    }

    .cta-button {
        padding: 1rem 2rem;
        font-size: var(--font-size-base);
        margin-top: 1rem;
    }

    /* Hide decorative CTA shapes on mobile */
    .cta-shape-2, .cta-shape-3 {
        display: none;
    }

    .cta-shape-1 {
        width: 60px;
        height: 60px;
    }
}

/* Mobile Portrait (640px and down) */
@media screen and (max-width: 640px) {
    :root {
        --font-size-5xl: clamp(1.5rem, 6vw, 1.75rem);
        --font-size-4xl: clamp(1.375rem, 5vw, 1.5rem);
        --font-size-3xl: clamp(1.25rem, 4vw, 1.375rem);
        --space-3xl: 2rem;
        --space-2xl: 1.5rem;
    }

    .hero-section {
        min-height: 450px;
        padding-top: 100px;
        padding-bottom: 3rem;
    }

    .hero-title {
        font-size: var(--font-size-3xl);
        line-height: 1.2;
    }

    .hero-subtitle {
        font-size: var(--font-size-base);
        max-width: 95%;
    }

    .top-badge {
        padding: 0.5rem 1.25rem;
        margin-bottom: 1rem;
    }

    /* Ultra simplified floating elements */
    .floating-shape {
        opacity: 0.3;
    }

    .shape-1 {
        width: 50px;
        height: 50px;
    }

    .shape-2 {
        width: 70px;
        height: 70px;
    }

    .icon-float:nth-child(1), .icon-float:nth-child(2) {
        font-size: 1.25rem;
    }

    .icon-float:nth-child(3) {
        display: none;
    }

    /* Services Section Ultra Mobile */
    .services-section {
        padding: 2.5rem 0;
    }

    .services-section .container {
        padding: 0 0.75rem;
    }

    .badge-accent {
        padding: 0.5rem 1rem;
    }

    .gradient-heading-alt {
        font-size: var(--font-size-2xl);
        margin-bottom: 0.75rem;
    }

    .services-section p.text-lg {
        font-size: var(--font-size-sm);
        margin-top: 1rem;
        max-width: 100%;
    }

    .service-card {
        min-height: 260px;
        padding: 1rem;
        border-radius: 16px;
    }

    .service-card h3 {
        font-size: var(--font-size-base);
        margin-bottom: 0.75rem;
    }

    .icon-circle {
        width: 45px;
        height: 45px;
    }

    .service-card ul li {
        padding: 0.4rem;
        font-size: var(--font-size-xs);
        margin-bottom: 0.5rem;
    }

    .service-card ul li i.fas.fa-check {
        margin-right: 0.5rem;
        font-size: 12px;
    }

    /* Why Choose Ultra Mobile */
    .why-choose-card {
        padding: 1.5rem;
        margin: 2rem auto;
        border-radius: 16px;
    }

    .why-choose-card h3 {
        font-size: var(--font-size-xl);
        text-align: center;
    }

    .why-choose-card .w-16 {
        width: 3rem;
        height: 3px;
    }

    .why-choose-item {
        padding: 0.75rem;
        margin-bottom: 1rem;
    }

    .why-choose-item h4 {
        font-size: var(--font-size-base);
        margin-bottom: 0.4rem;
    }

    .why-choose-item p {
        font-size: var(--font-size-xs);
        line-height: 1.5;
    }

    .check-icon-container {
        width: 35px;
        height: 35px;
        margin-right: 0.6rem;
    }

    .check-icon-container i {
        font-size: 1.2rem !important;
    }

    /* CTA Ultra Mobile */
    .cta-section {
        padding: 2rem 0;
    }

    .cta-section .container {
        padding: 0 1rem;
    }

    .cta-content h2 {
        font-size: var(--font-size-2xl);
        margin-bottom: 0.75rem;
    }

    .cta-content p {
        font-size: var(--font-size-base);
        margin-bottom: 1.5rem;
        max-width: 100%;
    }

    .cta-button {
        padding: 0.875rem 1.75rem;
        font-size: var(--font-size-sm);
        border-radius: 40px;
    }

    .cta-button i {
        margin-right: 0.5rem;
    }

    /* Hide all decorative shapes on ultra mobile */
    .cta-shape {
        display: none;
    }
}

/* Performance and Accessibility Optimizations */
@media (prefers-reduced-motion: reduce) {
    .floating-shape,
    .icon-float,
    .card-shimmer,
    .sparkles,
    .button-shine,
    .cta-section::before {
        animation: none;
    }

    .service-card,
    .why-choose-item,
    .cta-button {
        transition: none;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .service-card {
        border: 2px solid var(--gray-800);
    }

    .cta-button {
        border: 3px solid rgba(255, 255, 255, 0.8);
    }

    .why-choose-card {
        border: 2px solid rgba(255, 255, 255, 0.6);
    }
}

/* Print styles */
@media print {
    .floating-shape,
    .icon-float,
    .cta-shape,
    .sparkles {
        display: none;
    }

    .hero-section,
    .services-section,
    .why-choose-card,
    .cta-section {
        background: white !important;
        color: black !important;
    }

    .service-card {
        border: 1px solid #ccc;
        box-shadow: none;
    }
}