/* ============================================
   Responsive Stylesheet
   ============================================ */

/* ============================================
   Tablet Screens (1024px)
   ============================================ */

@media (max-width: 1024px) {
    .container {
        max-width: 960px;
    }

    .container,
    .container-fluid {
        padding-left: 18px;
        padding-right: 18px;
    }

    .logo-image {
        height: 92px;
    }

    .nav-menu {
        gap: 20px;
    }

    .hero-layout {
        gap: 24px;
        align-items: start;
    }

    .hero-content h1 {
        font-size: 40px;
    }

    .hero-stat,
    .floating-card,
    .subpage-card,
    .feature-card,
    .article-card,
    .visual-panel,
    .flow-card,
    .size-card,
    .cta-banner,
    .postcode-shell {
        padding: 24px;
    }

    .container-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .benefits-grid,
    .payment-methods,
    .areas-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* ============================================
   Tablet/Mobile Transition (768px)
   ============================================ */

@media (max-width: 768px) {
    html,
    body {
        overflow-x: hidden;
    }

    .header {
        position: sticky;
        top: 0;
    }

    .header-top {
        padding: 10px 0 12px;
        background: linear-gradient(135deg, #111827 0%, #374151 100%);
        animation: mobileSoftReveal 0.45s ease-out both;
    }

    .header-top .container-fluid {
        display: grid;
        grid-template-columns: 1fr;
        gap: 10px;
        text-align: center;
        padding-left: 16px;
        padding-right: 16px;
    }

    .header-actions {
        order: 1;
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
        width: 100%;
        animation: mobileSoftReveal 0.5s ease-out both;
    }

    .contact-info {
        order: 2;
        display: grid;
        grid-template-columns: 1fr;
        gap: 10px;
        width: 100%;
        animation: mobileSoftReveal 0.58s ease-out both;
    }

    .contact-info a,
    .header-actions .link {
        display: flex;
        align-items: center;
        justify-content: center;
        min-height: 44px;
        padding: 12px 14px;
        border: 1px solid rgba(255, 255, 255, 0.12);
        border-radius: 14px;
        background: rgba(255, 255, 255, 0.08);
        box-shadow: 0 12px 24px rgba(0, 0, 0, 0.16);
        backdrop-filter: blur(10px);
        white-space: normal;
        text-align: center;
        line-height: 1.35;
    }

    .navbar .container-fluid {
        position: relative;
        flex-wrap: wrap;
        justify-content: center;
        gap: 12px;
        padding-left: 16px;
        padding-right: 16px;
        padding-top: 10px;
        padding-bottom: 6px;
    }

    .logo {
        margin-right: 0;
        flex-basis: 100%;
        order: 1;
        display: flex;
        justify-content: center;
        animation: mobileSoftReveal 0.62s ease-out both;
    }

    .logo a {
        align-items: center;
        text-align: center;
    }

    .logo-tagline {
        text-align: center;
        white-space: normal;
        max-width: 280px;
        margin-top: 8px;
        font-size: 11px;
        letter-spacing: 0.12em;
    }

    .logo-image {
        height: 102px;
    }

    .hamburger {
        order: 2;
        position: absolute;
        right: 16px;
        top: 50%;
        transform: translateY(-50%);
        min-width: 46px;
        min-height: 46px;
        border-radius: 14px;
        background: linear-gradient(180deg, #ffffff 0%, #f3f4f6 100%);
        box-shadow: 0 14px 28px rgba(15, 23, 42, 0.12);
        animation: mobileSoftReveal 0.68s ease-out both;
    }

    .nav-menu {
        display: none;
        flex-direction: column;
        width: 100%;
        gap: 0;
        order: 3;
        flex-basis: 100%;
        margin-top: 14px;
        background: var(--white);
        border: 1px solid var(--border-gray);
        border-radius: 14px;
        overflow: hidden;
        max-height: calc(100vh - 150px);
        overflow-y: auto;
    }

    .nav-menu.active {
        display: flex;
        animation: mobileSoftReveal 0.22s ease-out both;
    }

    .nav-item {
        border-bottom: 1px solid var(--border-gray);
    }

    .nav-item:last-child {
        border-bottom: none;
    }

    .nav-link {
        padding: 14px 15px;
        display: block;
    }

    .dropdown-menu {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        box-shadow: none;
        border: none;
        border-radius: 0;
        background-color: var(--light-gray);
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease;
    }

    .nav-item.dropdown.active .dropdown-menu {
        max-height: 700px;
    }

    .dropdown-menu a {
        padding: 11px 24px 11px 30px;
        white-space: normal;
    }

    .hero {
        padding: 60px 20px;
    }

    .hero-content h1 {
        font-size: 28px;
        line-height: 1.2;
        word-wrap: break-word;
    }

    .hero-content p {
        font-size: 18px;
        margin-bottom: 30px;
    }

    .cta-btn {
        padding: 14px 30px;
        font-size: 16px;
    }

    .btn-secondary,
    .btn-ghost,
    .btn-primary,
    .btn-link {
        text-align: center;
    }

    section {
        padding: 40px 15px;
        margin-bottom: 0;
    }

    section h2 {
        font-size: 28px;
        margin-bottom: 30px;
    }

    section h3 {
        font-size: 20px;
        margin-bottom: 15px;
    }

    .postcode-section .container {
        padding: 0 15px;
    }

    .form-group {
        flex-direction: column;
        align-items: stretch;
        gap: 0;
    }

    .form-group input {
        min-width: 100%;
    }

    .btn-primary {
        width: 100%;
    }

    .postcode-form,
    .contact-form-grid {
        gap: 14px;
    }

    .container-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }

    .container-card {
        padding: 15px;
    }

    .container-visual {
        height: 120px;
    }

    .container-card h4 {
        font-size: 18px;
    }

    .container-card p {
        font-size: 12px;
    }

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

    .benefit-card {
        padding: 20px;
    }

    .benefit-card .icon {
        font-size: 40px;
    }

    .benefit-card h3 {
        font-size: 18px;
        margin: 10px 0;
    }

    .payment-methods {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }

    .payment-method {
        padding: 20px;
    }

    .payment-icon {
        font-size: 36px;
    }

    .areas-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }

    .area-card {
        padding: 20px;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .footer-section h4 {
        font-size: 16px;
    }

    .footer-section a,
    .footer-section p {
        font-size: 13px;
        overflow-wrap: anywhere;
    }

    .hero-layout,
    .split-grid,
    .subpage-grid,
    .flow-grid {
        grid-template-columns: 1fr;
    }

    .hero-layout,
    .subpage-grid,
    .split-grid {
        gap: 20px;
    }

    .hero-actions,
    .hero-stats,
    .cta-row,
    .pill-list {
        flex-direction: column;
        align-items: stretch;
    }

    .hero-actions > *,
    .cta-row > * {
        width: 100%;
    }

    .hero-stats {
        display: grid;
        grid-template-columns: 1fr;
    }

    .postcode-shell,
    .subpage-card,
    .feature-card,
    .article-card,
    .visual-panel,
    .flow-card,
    .cta-banner {
        padding: 22px;
    }

    .subpage-hero {
        padding: 60px 20px;
    }

    .subpage-hero h1 {
        font-size: 34px;
    }

    .subpage-hero p {
        font-size: 17px;
    }

    .detail-hero-badge {
        font-size: 13px;
        padding: 9px 14px;
    }

    .contact-form-grid,
    .size-cards,
    .stat-grid,
    .faq-grid,
    .waste-grid,
    .reviews-grid {
        grid-template-columns: 1fr;
    }

    .floating-card {
        position: static;
        width: 100%;
        margin-top: 16px;
    }

    .showcase-highlight {
        flex-direction: column;
        align-items: flex-start;
    }

    .container-photo {
        object-fit: contain;
    }

    .social-links {
        gap: 10px;
    }

    .social-links a {
        justify-content: center;
    }

    .hero-badge,
    .detail-hero-badge,
    .step-summary,
    .logo-tagline,
    .contact-info a,
    .header-actions .link,
    .footer-section a,
    .footer-section p,
    .cta-btn,
    .btn-secondary,
    .btn-ghost,
    .btn-primary,
    .btn-link {
        overflow-wrap: anywhere;
    }

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

    main > section[style*="linear-gradient"] h1 {
        font-size: 34px !important;
        line-height: 1.2 !important;
        word-break: break-word;
    }

    #cartContent > div[style*="grid-template-columns: 2fr 1fr"] {
        grid-template-columns: 1fr !important;
        gap: 24px !important;
    }

    #cartContent table {
        display: block;
        width: 100%;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    #cartContent th,
    #cartContent td {
        white-space: nowrap;
    }

    #cartContent [style*="position: sticky"] {
        position: static !important;
        top: auto !important;
    }
}

@media (max-width: 768px) and (prefers-reduced-motion: reduce) {
    .header-top,
    .header-actions,
    .contact-info,
    .logo,
    .hamburger,
    .nav-menu.active {
        animation: none !important;
    }
}

/* ============================================
   Small Tablet / Large Phones (640px)
   ============================================ */

@media (max-width: 640px) {
    .container,
    .container-fluid {
        padding-left: 14px;
        padding-right: 14px;
    }

    .header-top {
        padding: 7px 0;
    }

    .header-actions {
        grid-template-columns: 1fr 1fr;
    }

    .logo-image {
        height: 94px;
    }

    .hero {
        padding: 46px 14px;
    }

    .hero-badge,
    .detail-hero-badge {
        max-width: 100%;
        white-space: normal;
    }

    .hero-content h1 {
        font-size: 24px;
    }

    .hero-content p,
    .subpage-hero p {
        font-size: 15px;
    }

    .hero-stat strong,
    .stat-card strong {
        font-size: 22px;
    }

    .waste-card-visual {
        height: 130px;
        font-size: 42px;
    }

    .container-visual {
        height: 140px;
    }

    .floating-card,
    .subpage-card,
    .feature-card,
    .article-card,
    .visual-panel,
    .flow-card,
    .cta-banner,
    .postcode-shell {
        padding: 18px;
    }

    .contact-form-grid input,
    .contact-form-grid select,
    .contact-form-grid textarea {
        padding: 13px 14px;
    }

    .container-grid,
    .payment-methods,
    .areas-grid {
        grid-template-columns: 1fr;
    }
}

/* ============================================
   Small Mobile Screens (480px)
   ============================================ */

@media (max-width: 480px) {
    .header-top {
        padding: 5px 0;
        font-size: 12px;
    }

    .contact-info a,
    .header-actions .link {
        font-size: 11px;
        padding: 11px 12px;
    }

    .header-actions {
        grid-template-columns: 1fr;
    }

    .logo-text {
        font-size: 20px;
    }

    .logo-tagline {
        font-size: 10px;
        max-width: 220px;
    }

    .logo-image {
        height: 88px;
    }

    .hamburger {
        right: 14px;
        min-width: 42px;
        min-height: 42px;
    }

    .logo-sub {
        font-size: 10px;
        letter-spacing: 2px;
    }

    .hero {
        padding: 40px 15px;
    }

    .hero-badge {
        width: 100%;
        justify-content: center;
        text-align: center;
        font-size: 12px;
        padding: 10px 12px;
    }

    .hero-content h1 {
        font-size: 20px;
        line-height: 1.3;
        word-break: break-word;
    }

    .hero-content p {
        font-size: 14px;
        margin-bottom: 20px;
    }

    .cta-btn {
        padding: 12px 25px;
        font-size: 14px;
    }

    .btn-secondary,
    .btn-ghost,
    .btn-primary {
        width: 100%;
    }

    section {
        padding: 30px 15px;
    }

    section h2 {
        font-size: 22px;
        margin-bottom: 20px;
    }

    section h3 {
        font-size: 16px;
        margin-bottom: 15px;
    }

    .form-group input {
        padding: 10px 15px;
        font-size: 14px;
        margin-bottom: 10px;
    }

    .btn-primary {
        padding: 10px 20px;
        font-size: 14px;
        margin: 0;
    }

    .container-grid,
    .payment-methods,
    .areas-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .container-card,
    .benefit-card,
    .payment-method,
    .area-card {
        padding: 15px;
    }

    .container-visual {
        height: 100px;
    }

    .container-card h4,
    .benefit-card h3,
    .area-card h3 {
        font-size: 16px;
    }

    .container-card p,
    .benefit-card p,
    .area-card p,
    .payment-method p,
    .faq-item p,
    .review-card p,
    .feature-card p,
    .article-card p,
    .hero-stat span,
    .stat-card span {
        font-size: 13px;
    }

    .btn-link {
        font-size: 12px;
    }

    .benefit-card .icon {
        font-size: 32px;
        margin-bottom: 10px;
    }

    .payment-icon {
        font-size: 28px;
    }

    .footer-content {
        padding: 40px 15px 20px;
    }

    .footer-grid {
        gap: 25px;
    }

    .footer-section h4 {
        font-size: 14px;
    }

    .footer-section a,
    .footer-section p {
        font-size: 12px;
    }

    .footer-bottom {
        padding: 15px 10px;
        font-size: 11px;
    }

    .nav-menu {
        max-height: calc(100vh - 120px);
    }

    .nav-link,
    .dropdown-menu a {
        font-size: 14px;
    }

    .hero-actions,
    .cta-row,
    .pill-list,
    .social-links {
        gap: 10px;
    }

    .container-meta {
        gap: 4px;
    }

    .postcode-shell,
    .subpage-card,
    .feature-card,
    .article-card,
    .visual-panel,
    .flow-card,
    .cta-banner,
    .review-card,
    .faq-item,
    .waste-card-content,
    .floating-card,
    .hero-stat,
    .stat-card {
        padding: 16px;
    }

    .subpage-hero h1 {
        font-size: 28px;
    }

    .subpage-hero p {
        font-size: 15px;
    }

    .detail-hero-badge {
        width: 100%;
        justify-content: center;
        text-align: center;
    }

    .hero-showcase,
    .visual-panel img {
        max-width: 100%;
    }

    main > section[style*="linear-gradient"] h1 {
        font-size: 26px !important;
    }

    #emptyCart a,
    #cartContent button {
        width: 100%;
        display: inline-flex;
        justify-content: center;
        align-items: center;
    }

    .flow-number {
        width: 42px;
        height: 42px;
        font-size: 18px;
    }
}

/* ============================================
   Extra Small Screens (360px)
   ============================================ */

@media (max-width: 360px) {
    .contact-info a,
    .header-actions .link {
        font-size: 10px;
    }

    .logo-image {
        height: 76px;
    }

    .nav-link,
    .dropdown-menu a {
        font-size: 13px;
    }

    .hero-content h1 {
        font-size: 18px;
    }

    .hero-content p {
        font-size: 13px;
    }

    section h2 {
        font-size: 18px;
        margin-bottom: 15px;
    }

    .container-grid,
    .areas-grid {
        gap: 10px;
    }

    .hero-badge,
    .detail-hero-badge,
    .cta-btn,
    .btn-secondary,
    .btn-ghost,
    .btn-primary {
        font-size: 13px;
    }

    .postcode-shell,
    .subpage-card,
    .feature-card,
    .article-card,
    .visual-panel,
    .flow-card,
    .cta-banner {
        padding: 14px;
    }
}

/* ============================================
   Touch Device Optimizations
   ============================================ */

@media (hover: none) {
    .nav-item.dropdown:hover .dropdown-menu {
        opacity: 0;
        visibility: hidden;
        transform: translateY(-10px);
    }

    .container-card,
    .benefit-card,
    .payment-method {
        cursor: pointer;
    }
}

@media (max-width: 768px) {
    .calculator-step {
        border-radius: 16px;
    }

    .calculator-step-trigger {
        padding: 18px;
        align-items: flex-start;
    }

    .calculator-step-body {
        padding: 0 18px 18px;
    }

    .step-heading-group strong {
        font-size: 18px;
    }

    .step-summary {
        max-width: 100%;
        white-space: normal;
    }

    .step-toggle {
        margin-top: 10px;
    }

    .selection-card-media {
        height: 120px;
    }

    .selection-card-content {
        padding: 16px;
    }

    .waste-option-grid,
    .size-option-grid,
    .calculator-breakdown {
        grid-template-columns: 1fr;
    }

    .selection-card {
        padding: 16px;
    }

    .result-box {
        padding: 20px;
    }

    .result-summary strong {
        font-size: 32px;
    }
}

/* ============================================
   Print Styles
   ============================================ */

@media print {
    .header,
    .footer,
    .cta-btn,
    .form-group,
    .hamburger {
        display: none;
    }

    .main-content {
        padding: 0;
    }

    section {
        page-break-inside: avoid;
    }

    a {
        color: inherit;
        text-decoration: underline;
    }
}
