/* =====================================================
   Public Responsive — All public pages
   Load AFTER main.css and home.css
   ===================================================== */

/* ── NAV: Ensure buttons always visible on mobile ── */
@media (max-width: 900px) {
    .pub-nav .nav-actions .btn-login,
    .pub-nav .nav-actions .btn-register {
        display: inline-flex !important;
    }
    .pub-nav .nav-links {
        display: none !important;
    }
    .pub-nav .mobile-menu-btn {
        display: block !important;
    }
}

@media (max-width: 600px) {
    .pub-nav .nav-actions .btn-login,
    .pub-nav .nav-actions .btn-register {
        display: inline-flex !important;
        padding: 5px 10px !important;
        font-size: 11px !important;
    }
}

/* ── NAV: Mobile menu dropdown ── */
@media (max-width: 900px) {
    .pub-nav .nav-links.open {
        display: flex !important;
        flex-direction: column;
        position: fixed;
        top: 64px;
        right: 0;
        left: 0;
        background: #fff;
        box-shadow: 0 8px 32px rgba(0,0,0,0.12);
        padding: 16px 20px;
        gap: 0;
        z-index: 999;
        max-height: calc(100vh - 64px);
        overflow-y: auto;
    }
    .pub-nav .nav-links.open a {
        color: #1a1a2e !important;
        padding: 14px 0;
        border-bottom: 1px solid #f0ebe3;
        width: 100%;
        font-size: 15px;
        text-align: right;
    }
    .pub-nav .nav-links.open a:last-child {
        border-bottom: none;
    }
    .pub-nav .nav-links.open .mobile-login-btn {
        display: block !important;
        margin-top: 12px;
        text-align: center;
        padding: 12px;
        background: linear-gradient(135deg, #C4922A, #a0771e);
        color: #fff;
        border-radius: 10px;
        font-weight: 600;
        text-decoration: none;
    }
}

/* ── NAV: Compact on small screens ── */
@media (max-width: 480px) {
    .pub-nav {
        padding: 0 12px;
        height: 60px;
    }
    .pub-nav .logo {
        font-size: 13px;
        gap: 6px;
    }
    .pub-nav .logo .logo-icon,
    .pub-nav .logo img {
        height: 24px;
        width: 24px;
    }
    .pub-nav .nav-actions {
        gap: 4px;
    }
    .pub-nav .nav-actions .btn-login {
        padding: 5px 8px !important;
        font-size: 11px !important;
    }
    .pub-nav .nav-actions .btn-register {
        padding: 5px 8px !important;
        font-size: 11px !important;
    }
}

/* ── Hero Slider responsive ── */
@media (max-width: 768px) {
    .hero-slider,
    .hero-slider[style] {
        height: 400px !important;
        min-height: 400px !important;
    }
    .hero-slider .hero-content {
        padding: 80px 16px 60px;
    }
    .hero-slider .hero-title {
        font-size: 24px !important;
        line-height: 1.4 !important;
    }
    .hero-slider .hero-subtitle {
        font-size: 13px !important;
        line-height: 1.7 !important;
    }
    .hero-actions {
        flex-direction: column;
        align-items: center;
        gap: 10px;
    }
    .hero-actions .btn-hero-primary,
    .hero-actions .btn-hero-secondary {
        padding: 12px 24px !important;
        font-size: 13px !important;
        width: 100%;
        max-width: 280px;
        justify-content: center;
    }
    .hero-arrow {
        display: none;
    }
    .hero-counter {
        display: none;
    }
}

@media (max-width: 480px) {
    .hero-slider,
    .hero-slider[style] {
        height: 320px !important;
        min-height: 320px !important;
    }
    .hero-slider .hero-content {
        padding: 70px 12px 50px;
    }
    .hero-slider .hero-title {
        font-size: 20px !important;
    }
    .hero-slider .hero-subtitle {
        font-size: 12px !important;
    }
}

/* ── Counters ── */
@media (max-width: 768px) {
    .counters-row {
        grid-template-columns: repeat(2, 1fr) !important;
        margin-top: -28px;
        border-radius: 12px;
    }
    .counter-cell {
        padding: 16px 8px !important;
    }
    .counter-number {
        font-size: 22px !important;
    }
    .counter-label {
        font-size: 10px !important;
    }
}

@media (max-width: 480px) {
    .counters-row {
        grid-template-columns: 1fr 1fr !important;
        margin-top: -20px;
    }
    .counter-number {
        font-size: 18px !important;
    }
}

/* ── Services Grid ── */
@media (max-width: 768px) {
    .services-grid {
        grid-template-columns: repeat(3, 1fr) !important;
        gap: 10px !important;
    }
    .service-card {
        padding: 18px 12px;
    }
    .service-card .icon-wrap {
        width: 42px;
        height: 42px;
        font-size: 18px;
    }
    .service-card h3 {
        font-size: 12px;
    }
}

@media (max-width: 480px) {
    .services-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 8px !important;
    }
    .service-card {
        padding: 14px 10px;
    }
    .service-card .icon-wrap {
        width: 38px;
        height: 38px;
        font-size: 16px;
    }
    .service-card h3 {
        font-size: 11px;
    }
}

/* ── Steps Grid ── */
@media (max-width: 768px) {
    .steps-grid {
        grid-template-columns: 1fr 1fr !important;
        gap: 16px;
    }
    .steps-grid::before {
        display: none;
    }
    .step-number {
        width: 48px;
        height: 48px;
        font-size: 16px;
    }
}

@media (max-width: 480px) {
    .steps-grid {
        grid-template-columns: 1fr !important;
    }
}

/* ── Features Grid ── */
@media (max-width: 768px) {
    .features-grid {
        grid-template-columns: 1fr !important;
        gap: 12px;
    }
    .feature-card {
        padding: 20px 16px;
    }
}

/* ── Testimonials ── */
@media (max-width: 768px) {
    .testimonials-grid {
        gap: 12px;
    }
    .testimonials-carousel {
        padding: 0 40px;
    }
    .testimonial-card {
        flex: 0 0 calc(50% - 6px);
        min-width: 200px;
        padding: 20px;
    }
    .testimonial-text {
        font-size: 12px;
    }
    .testi-arrow {
        width: 32px;
        height: 32px;
        font-size: 12px;
    }
}

@media (max-width: 480px) {
    .testimonials-carousel {
        padding: 0 36px;
    }
    .testimonial-card {
        flex: 0 0 calc(100% - 0px);
        min-width: 260px;
    }
}

/* ── CTA Section ── */
@media (max-width: 768px) {
    .cta-card {
        padding: 30px 20px !important;
    }
    .cta-btn {
        padding: 12px 24px !important;
        font-size: 13px !important;
    }
}

/* ── Footer ── */
@media (max-width: 768px) {
    .footer-grid {
        grid-template-columns: 1fr !important;
        gap: 20px;
    }
    .footer-licenses {
        grid-template-columns: repeat(3, 1fr);
    }
    .footer-license-item img {
        width: 44px;
        height: 44px;
    }
    .footer-bottom {
        flex-direction: column;
        text-align: center;
    }
    .pub-footer {
        padding: 30px 16px 20px;
    }
}

@media (max-width: 480px) {
    .footer-licenses {
        grid-template-columns: repeat(2, 1fr);
    }
    .footer-license-item img {
        width: 40px;
        height: 40px;
    }
    .footer-brand p {
        font-size: 11px;
    }
}

/* ── Common section spacing ── */
@media (max-width: 768px) {
    .pub-section {
        padding: 36px 16px;
    }
    .pub-section-wide {
        padding: 36px 16px;
    }
    .section-header {
        margin-bottom: 24px;
    }
    .section-title {
        font-size: 20px !important;
    }
    .section-subtitle {
        font-size: 13px;
    }
}

@media (max-width: 480px) {
    .pub-section {
        padding: 28px 12px;
    }
    .pub-section-wide {
        padding: 28px 12px;
    }
    .section-title {
        font-size: 18px !important;
    }
}

/* ── Inner pages header spacing ── */
@media (max-width: 768px) {
    body.page-inner > div:first-of-type {
        padding-top: 88px !important;
    }
    .form-row,
    body.page-inner [style*="grid-template-columns:repeat(3"] {
        grid-template-columns: 1fr !important;
    }
    body.page-inner .card {
        padding: 20px !important;
    }
}

@media (max-width: 480px) {
    body.page-inner > div:first-of-type {
        padding-top: 76px !important;
    }
    body.page-inner .card {
        padding: 16px !important;
    }
}

/* ── Dark mode for public nav ── */
[data-theme="dark"] .pub-nav .nav-links.open {
    background: #1a1a2e;
}
[data-theme="dark"] .pub-nav .nav-links.open a {
    color: rgba(255,255,255,0.8) !important;
    border-bottom-color: rgba(255,255,255,0.06);
}
[data-theme="dark"] .pub-nav .nav-links.open .mobile-login-btn {
    background: linear-gradient(135deg, #C4922A, #a0771e);
}

/* ── Detail pages — breadcrumbs ── */
@media (max-width: 768px) {
    .breadcrumb { font-size: 12px !important; flex-wrap: wrap; gap: 4px; }
    .breadcrumb .separator { margin: 0 2px; }
}

/* ── Detail pages — pricing tiers grid ── */
@media (max-width: 768px) {
    [style*="grid-template-columns:repeat(auto-fill,minmax(250px"] {
        grid-template-columns: 1fr !important;
        gap: 12px !important;
    }
    [style*="grid-template-columns:repeat(auto-fit,minmax(200px"] {
        grid-template-columns: 1fr !important;
        gap: 10px !important;
    }
    [style*="grid-template-columns:repeat(auto-fill,minmax(220px"] {
        grid-template-columns: 1fr !important;
        gap: 12px !important;
    }
}

@media (max-width: 480px) {
    /* Price numbers smaller */
    [style*="font-size:24px"][style*="font-weight:700"] {
        font-size: 20px !important;
    }
}

/* ── Detail pages — catalog/download cards ── */
@media (max-width: 768px) {
    [style*="display:flex"][style*="background:linear-gradient(135deg,#eff6ff"] {
        flex-direction: column !important;
        text-align: center !important;
        align-items: center !important;
    }
    [style*="display:flex"][style*="background:linear-gradient(135deg,#eff6ff"] a[download] {
        width: 100% !important;
        justify-content: center !important;
    }
}

/* ── Detail pages — full width CTA button ── */
@media (max-width: 768px) {
    .btn-gold.btn-lg,
    a[style*="width:100%"][style*="btn-gold"] {
        width: 100% !important;
        justify-content: center !important;
    }
}

/* ── Detail pages — image/video overflow ── */
@media (max-width: 768px) {
    img { max-width: 100% !important; height: auto !important; }
    video { max-width: 100% !important; }
    iframe { max-width: 100% !important; }
}

/* ── Detail pages — about/contact forms ── */
@media (max-width: 768px) {
    body.page-inner [style*="grid-template-columns:repeat(3"] {
        grid-template-columns: 1fr !important;
    }
    body.page-inner form [style*="display:grid"] {
        grid-template-columns: 1fr !important;
    }
}

/* ── Partners section mobile ── */
@media (max-width: 768px) {
    .partners-section > div > div:last-child {
        gap: 12px !important;
    }
    .partners-section > div > div:last-child > div {
        min-width: 120px !important;
        max-width: 160px !important;
        padding: 14px 16px !important;
    }
}
@media (max-width: 480px) {
    .partners-section > div > div:last-child {
        gap: 8px !important;
    }
    .partners-section > div > div:last-child > div {
        min-width: 100px !important;
        max-width: 140px !important;
        padding: 10px 12px !important;
    }
    .partners-section > div > div:last-child > div h3 {
        font-size: 13px !important;
    }
    .partners-section > div > div:last-child > div p {
        font-size: 10px !important;
    }
}

/* ── Team section mobile ── */
@media (max-width: 768px) {
    .team-section > div > div:last-child {
        gap: 12px !important;
    }
    .team-section > div > div:last-child > div {
        width: 160px !important;
        padding: 18px 14px !important;
    }
    .team-section > div > div:last-child > div img,
    .team-section > div > div:last-child > div > div:first-child {
        width: 64px !important;
        height: 64px !important;
    }
}
@media (max-width: 480px) {
    .team-section > div > div:last-child {
        gap: 10px !important;
    }
    .team-section > div > div:last-child > div {
        width: 140px !important;
        padding: 14px 10px !important;
    }
    .team-section > div > div:last-child > div h3 {
        font-size: 13px !important;
    }
    .team-section > div > div:last-child > div p {
        font-size: 10px !important;
    }
}

/* ── FAQ Accordion mobile ── */
@media (max-width: 768px) {
    .faq-question {
        padding: 14px 16px;
    }
    .faq-question span {
        font-size: 13px;
    }
    .faq-answer p {
        padding: 0 16px 14px;
        font-size: 12px;
    }
}

/* ── Reduced motion ── */
@media (prefers-reduced-motion: reduce) {
    .hero-slider .hero-slide { transition: opacity 0.2s !important; }
}
