/* ==========================================================================
   RAMINOL - COMPREHENSIVE RESPONSIVE STYLESHEET
   Flawless pixel-perfect alignment across all desktop, tablet, and mobile devices
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. LARGE SCREENS & LAPTOPS (<= 1200px)
   -------------------------------------------------------------------------- */
@media (max-width: 1200px) {
    .section-container {
        width: 92%;
    }

    .hero-heading {
        font-size: 48px;
    }

    .featured-grid {
        gap: 50px;
    }

    .brands-card-grid {
        gap: 16px;
    }

    .brand-item-card {
        padding: 26px 20px;
        min-height: 240px;
    }

    .card-brand-title {
        font-size: 17.5px;
    }

    .about-grid {
        gap: 40px;
    }

    .values-pillars-grid {
        gap: 20px;
    }

    .value-item {
        padding: 18px 16px;
    }

    .news-cards-grid {
        gap: 20px;
    }
}

/* --------------------------------------------------------------------------
   2. TABLETS (<= 992px)
   -------------------------------------------------------------------------- */
@media (max-width: 992px) {
    :root {
        --header-height: 72px;
    }

    .header-container {
        width: 92%;
    }

    /* Mobile Nav Toggle */
    .mobile-toggle {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 38px;
        height: 38px;
        border-radius: 8px;
        background: rgba(255, 255, 255, 0.05);
        color: #ffffff;
        font-size: 18px;
        transition: var(--transition-fast);
    }

    .mobile-toggle:hover {
        background: rgba(255, 255, 255, 0.12);
    }

    /* Mobile Drawer */
    .nav-menu {
        position: fixed;
        top: var(--header-height);
        left: 0;
        width: 100%;
        height: calc(100dvh - var(--header-height));
        background: rgba(5, 8, 14, 0.98);
        backdrop-filter: blur(25px);
        -webkit-backdrop-filter: blur(25px);
        flex-direction: column;
        justify-content: space-between;
        padding: 28px 24px 36px 24px;
        transform: translateY(-100%);
        opacity: 0;
        pointer-events: none;
        transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.3s ease;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        z-index: 999;
    }

    .nav-menu.open {
        transform: translateY(0);
        opacity: 1;
        pointer-events: all;
    }

    .nav-list {
        flex-direction: column;
        align-items: flex-start;
        width: 100%;
        gap: 8px;
    }

    .nav-item {
        width: 100%;
    }

    .nav-link {
        font-size: 17px;
        font-weight: 600;
        display: flex;
        justify-content: space-between;
        align-items: center;
        width: 100%;
        padding: 12px 14px;
        border-radius: 10px;
        border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    }

    .nav-link:hover,
    .nav-link.active {
        background: rgba(255, 255, 255, 0.06);
        color: #ffffff;
    }

    .nav-link.active::after {
        display: none;
    }

    .nav-drawer-footer {
        display: block;
        width: 100%;
        margin-top: 24px;
        padding-top: 20px;
        border-top: 1px solid rgba(255, 255, 255, 0.08);
    }

    .mobile-drawer-btn {
        width: 100%;
        justify-content: center;
        padding: 14px 24px;
    }

    /* Hero */
    .hero-section {
        min-height: auto;
        padding: 130px 0 75px 0;
    }

    .hero-inner {
        flex-direction: column;
        align-items: flex-start;
        gap: 36px;
        padding: 10px 0 30px 0;
    }

    .hero-content {
        max-width: 100%;
    }

    .hero-heading {
        font-size: 42px;
        line-height: 1.15;
    }

    .hero-desc {
        max-width: 100%;
        font-size: 15px;
        margin-bottom: 30px;
    }

    .hero-corner-tagline {
        text-align: left;
        padding-bottom: 0;
    }

    /* Section Headers */
    .section-header-split {
        flex-direction: column;
        align-items: flex-start;
        gap: 14px;
        margin-bottom: 36px;
    }

    .header-right {
        justify-content: flex-start;
        width: 100%;
    }

    .section-desc-dark,
    .section-desc-light {
        max-width: 100%;
        font-size: 14.5px;
    }

    .section-title-dark,
    .section-title-light {
        font-size: 32px;
    }

    /* Featured Product (Arch at) */
    .featured-product-section {
        padding: 90px 0;
    }

    .featured-grid {
        grid-template-columns: 1fr;
        gap: 44px;
        text-align: center;
    }

    .featured-info {
        max-width: 600px;
        margin: 0 auto;
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    .featured-phones-img {
        max-width: 440px;
        margin: 0 auto;
    }

    .featured-desc {
        max-width: 100%;
    }

    .store-badge-group {
        justify-content: center;
    }

    /* Applications (2x2 Grid) */
    .brands-section {
        padding: 90px 0;
    }

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

    /* About Section */
    .about-group-section {
        padding: 90px 0 70px 0;
    }

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

    .about-photo {
        height: 320px;
        border-radius: 16px;
    }

    .about-text-col {
        max-width: 100%;
    }

    .values-pillars-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
        padding-top: 32px;
    }

    /* Stats (2x2 Grid) */
    .stats-bar-section {
        padding: 50px 0;
    }

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

    .stat-metric-col:not(:last-child)::after {
        display: none;
    }

    /* News Grid (2 Columns + Horizontal 3rd Card) */
    .news-section {
        padding: 90px 0;
    }

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

    .news-post-card:last-child {
        grid-column: span 2;
        flex-direction: row;
    }

    .news-post-card:last-child .news-thumb-wrap {
        width: 42%;
        height: auto;
        min-height: 220px;
        flex-shrink: 0;
    }

    .news-post-card:last-child .news-post-body {
        width: 58%;
    }

    /* CTA Banner */
    .cta-banner-section {
        padding: 70px 0;
    }

    .cta-flex-container {
        flex-direction: column;
        align-items: flex-start;
        gap: 24px;
    }

    .cta-text-content {
        max-width: 100%;
    }

    /* Footer */
    .site-footer {
        padding-top: 70px;
    }

    .footer-top-row {
        grid-template-columns: repeat(2, 1fr);
        gap: 40px;
    }
}

/* --------------------------------------------------------------------------
   3. TABLETS PORTRAIT & PHABLETS (<= 768px)
   -------------------------------------------------------------------------- */
@media (max-width: 768px) {
    .section-container {
        width: 90%;
    }

    .hero-heading {
        font-size: 38px;
    }

    .section-title-dark,
    .section-title-light {
        font-size: 30px;
    }

    /* News Grid Stack on <= 768px */
    .news-cards-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .news-post-card:last-child {
        grid-column: span 1;
        flex-direction: column;
    }

    .news-post-card:last-child .news-thumb-wrap {
        width: 100%;
        height: 200px;
    }

    .news-post-card:last-child .news-post-body {
        width: 100%;
    }

    /* Modals Responsive */
    .site-modal-dialog {
        padding: 30px 22px;
        max-width: 95%;
        max-height: 92dvh;
        border-radius: 18px;
    }

    .contact-modal-grid {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    .contact-info-panel {
        margin-top: 4px;
        padding: 20px;
    }
}

/* --------------------------------------------------------------------------
   4. MOBILE PHONES (<= 600px)
   -------------------------------------------------------------------------- */
@media (max-width: 600px) {
    .section-container {
        width: 88%;
    }

    /* Header Actions */
    .header-actions {
        gap: 10px;
    }

    /* Hero */
    .hero-section {
        padding: 105px 0 60px 0;
    }

    .hero-heading {
        font-size: clamp(28px, 7.5vw, 35px);
        line-height: 1.18;
        margin-bottom: 18px;
    }

    .hero-desc {
        font-size: 14px;
        line-height: 1.65;
        margin-bottom: 26px;
    }

    .hero-cta-group {
        flex-direction: column;
        align-items: stretch;
        width: 100%;
        gap: 12px;
    }

    .btn-solid-white,
    .btn-ghost-glass {
        justify-content: center;
        width: 100%;
        padding: 13px 20px;
    }

    /* Featured Product (Arch at) */
    .featured-product-section {
        padding: 70px 0;
    }

    .featured-title {
        font-size: 30px;
        margin-bottom: 16px;
    }

    .featured-desc {
        font-size: 14px;
        line-height: 1.7;
        margin-bottom: 26px;
    }

    .featured-phones-img {
        max-width: 100%;
        border-radius: 20px;
    }

    .store-badge-group {
        flex-direction: column;
        width: 100%;
        gap: 12px;
        margin-bottom: 24px;
    }

    .store-badge-card {
        width: 100%;
        justify-content: center;
        padding: 12px 20px;
    }

    /* Applications Single Column */
    .brands-section {
        padding: 70px 0;
    }

    .brands-card-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .brand-item-card {
        padding: 24px 20px;
        min-height: auto;
    }

    .section-title-dark,
    .section-title-light {
        font-size: 27px;
    }

    /* About Section */
    .about-group-section {
        padding: 70px 0 50px 0;
    }

    .about-main-title {
        font-size: 27px;
    }

    .about-paragraph {
        font-size: 14.5px;
    }

    .about-photo {
        height: 230px;
    }

    .values-pillars-grid {
        grid-template-columns: 1fr;
        gap: 14px;
        padding-top: 26px;
    }

    .value-item {
        padding: 16px 14px;
    }

    /* Stats 2x2 Clean Layout */
    .stats-bar-section {
        padding: 40px 0;
    }

    .stats-grid-row {
        grid-template-columns: repeat(2, 1fr);
        gap: 24px 14px;
    }

    .metric-number-wrap {
        font-size: 36px;
        height: 42px;
        margin-bottom: 6px;
    }

    .metric-plus,
    .metric-percent {
        font-size: 22px;
    }

    .metric-infinity {
        font-size: 38px;
    }

    .metric-label {
        font-size: 12px;
        min-height: 32px;
    }

    /* News */
    .news-section {
        padding: 70px 0;
    }

    .news-thumb-wrap {
        height: 180px;
    }

    .news-post-body {
        padding: 20px 18px;
    }

    .news-post-title {
        font-size: 16px;
        margin-bottom: 14px;
    }

    /* CTA */
    .cta-banner-section {
        padding: 55px 0;
    }

    .cta-headline {
        font-size: 25px;
    }

    .cta-subtext {
        font-size: 14px;
    }

    .btn-cta-pill {
        width: 100%;
        justify-content: center;
        padding: 13px 24px;
    }

    /* Footer */
    .site-footer {
        padding-top: 55px;
    }

    .footer-top-row {
        grid-template-columns: 1fr;
        gap: 30px;
        padding-bottom: 45px;
    }

    .footer-col-title {
        margin-bottom: 16px;
    }

    .footer-bottom-inner {
        flex-direction: column;
        gap: 10px;
        text-align: center;
    }

    /* Modals */
    .site-modal-dialog {
        padding: 24px 16px;
        border-radius: 16px;
    }

    .modal-close-btn {
        top: 16px;
        right: 16px;
        width: 32px;
        height: 32px;
        font-size: 14px;
    }

    .modal-header {
        padding-right: 44px;
        margin-bottom: 20px;
    }

    .modal-title {
        font-size: 21px;
    }

    .modal-subtitle {
        font-size: 13px;
    }

    .form-row {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    /* 16px font-size prevents iOS Safari auto-zoom */
    .form-group input,
    .form-group select,
    .form-group textarea {
        font-size: 16px;
        padding: 11px 13px;
    }

    .details-features-list {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .details-hero-banner {
        height: 180px;
        margin-bottom: 18px;
    }

    .details-main-heading {
        font-size: 22px;
    }

    .details-lead-text {
        font-size: 14px;
    }

    .details-actions-row {
        flex-direction: column;
        width: 100%;
        gap: 10px;
    }

    .details-actions-row button {
        width: 100%;
        justify-content: center;
    }

    /* Floating Toasts */
    .site-toast-container {
        left: 16px;
        right: 16px;
        bottom: 16px;
        width: auto;
    }

    .site-toast {
        width: 100%;
        transform: translateY(30px);
        padding: 12px 16px;
        font-size: 13px;
    }

    .site-toast.show {
        transform: translateY(0);
    }
}

/* --------------------------------------------------------------------------
   5. COMPACT SMARTPHONES (<= 480px)
   -------------------------------------------------------------------------- */
@media (max-width: 480px) {
    /* Hide top pill button on small phones; available inside mobile menu drawer */
    .header-actions .btn-header-pill {
        display: none;
    }

    .header-actions {
        gap: 8px;
    }

    .brand-logo .logo-title {
        font-size: 15px;
    }

    .brand-logo .logo-sub {
        font-size: 7.5px;
    }

    .logo-symbol {
        width: 28px;
        height: 28px;
    }

    .hero-heading {
        font-size: clamp(26px, 7vw, 32px);
    }

    .section-title-dark,
    .section-title-light {
        font-size: 25px;
    }

    .region-option-card {
        padding: 12px 14px;
    }

    .region-flag-name {
        gap: 10px;
    }

    .region-flag-name strong {
        font-size: 13.5px;
    }

    .region-flag-name span {
        font-size: 11.5px;
    }
}

/* --------------------------------------------------------------------------
   6. ULTRA-COMPACT PHONES (<= 360px)
   -------------------------------------------------------------------------- */
@media (max-width: 360px) {
    .section-container {
        width: 90%;
    }

    .hero-heading {
        font-size: 24px;
    }

    .section-title-dark,
    .section-title-light {
        font-size: 22px;
    }

    .btn-solid-white,
    .btn-ghost-glass,
    .btn-cta-pill {
        padding: 12px 16px;
        font-size: 13px;
    }

    .brand-item-card {
        padding: 20px 16px;
    }

    .site-modal-dialog {
        padding: 20px 14px;
    }
}
