/*
=========================================
  RR Electronics — INDEX PAGE STYLES
=========================================
  File    : index.css
  Scope   : Home page (index.php) ONLY
  Author  : RR Electronics
  Notes   : Loaded after global.css.
            Contains every home-page-specific
            style block so global.css stays clean.
=========================================
*/


/* =========================================
   1. HERO SECTION
   ========================================= */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding-top: 100px;
    overflow: hidden;
    background: var(--dark);
}

.hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        linear-gradient(to right, rgba(10, 22, 40, 0.92) 35%, rgba(10, 22, 40, 0.45) 100%),
        url('images/hero.webp');
    background-size: cover;
    background-position: center;
    z-index: 0;
}

.hero .container {
    position: relative;
    z-index: 1;
}

.hero-content {
    max-width: 700px;
}

.hero-badge {
    display: inline-block;
    background: rgba(59, 130, 246, 0.15);
    color: var(--primary);
    padding: 0.5rem 1rem;
    border-radius: 9999px;
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    border: 1px solid rgba(59, 130, 246, 0.3);
}

.hero h1 {
    font-size: clamp(2.2rem, 7vw, 4rem);
    line-height: 1.15;
    margin-bottom: 1.5rem;
}

.hero > .container p,
.hero-content > p {
    font-size: 1.125rem;
    color: var(--text-muted);
    margin-bottom: 2.5rem;
    max-width: 580px;
}

.hero-btns {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

/* Disclaimer notice */
.hero-disclaimer {
    margin-top: 1.5rem;
    background: rgba(255, 193, 7, 0.12);
    border: 1px solid rgba(255, 193, 7, 0.4);
    border-radius: 10px;
    padding: 0.9rem 1.25rem;
    max-width: 620px;
}

.hero-disclaimer p {
    margin: 0;
    font-size: 0.82rem !important;
    color: #f0c040 !important;
    line-height: 1.6;
}


/* =========================================
   2. STATS SECTION
   ========================================= */
.stats {
    padding: 4rem 0;
    background: var(--dark-light);
    border-bottom: 1px solid var(--glass-border);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
    text-align: center;
}

.stat-item h3 {
    font-size: 2.5rem;
    color: var(--primary);
    margin-bottom: 0.5rem;
}

.stat-item p {
    color: var(--text-muted);
    font-weight: 500;
}


/* =========================================
   3. BRANDS SECTION
   ========================================= */
.brands {
    background: var(--dark);
    padding: 60px 0;
    border-bottom: 1px solid var(--glass-border);
}

.brands-flex {
    display: flex;
    justify-content: space-around;
    align-items: center;
    flex-wrap: wrap;
    gap: 2rem;
    opacity: 0.6;
    filter: grayscale(1);
    transition: var(--transition);
}

.brands-flex:hover {
    opacity: 1;
    filter: grayscale(0);
}

.brand-logo {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--white);
    font-family: 'Poppins', sans-serif;
    text-align: center;
    padding: 0.5rem;
}


/* =========================================
   4. SERVICES SECTION
   ========================================= */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

.service-card {
    background: var(--dark-light);
    padding: 2.5rem;
    border-radius: 16px;
    border: 1px solid var(--glass-border);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.service-card:hover {
    transform: translateY(-10px);
    border-color: var(--primary);
    box-shadow: var(--shadow-premium);
}

.service-icon {
    width: 60px;
    height: 60px;
    background: rgba(59, 130, 246, 0.1);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    margin-bottom: 1.5rem;
    flex-shrink: 0;
}

.service-icon i {
    width: 28px;
    height: 28px;
}

.service-card h3 {
    margin-bottom: 1rem;
    font-size: 1.2rem;
}

.service-card p {
    color: var(--text-muted);
    margin-bottom: 1.5rem;
    flex-grow: 1;
    line-height: 1.7;
}

.service-link {
    color: var(--primary);
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: auto;
    transition: var(--transition);
}

.service-link:hover {
    color: var(--white);
    gap: 0.75rem;
}

.service-link i {
    width: 16px;
    height: 16px;
}


/* =========================================
   5. TESTIMONIALS SECTION
   ========================================= */
.testimonials {
    background: var(--dark-light);
}

.testimonials-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

.testimonial-card {
    background: var(--dark);
    padding: 2.5rem;
    border-radius: 16px;
    border: 1px solid var(--glass-border);
    position: relative;
    display: flex;
    flex-direction: column;
    transition: var(--transition);
}

.testimonial-card:hover {
    border-color: rgba(59, 130, 246, 0.25);
    transform: translateY(-4px);
    box-shadow: var(--shadow-premium);
}

.testimonial-card i {
    color: var(--primary);
    margin-bottom: 1rem;
    display: block;
}

.testimonial-text {
    font-style: italic;
    color: var(--text-light);
    margin-bottom: 1.5rem;
    line-height: 1.7;
    flex-grow: 1;
}

.testimonial-author {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.author-img {
    width: 50px;
    height: 50px;
    min-width: 50px;
    background: var(--gradient-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    color: var(--white);
    font-size: 0.95rem;
}

.author-info h4 {
    font-size: 1rem;
    margin: 0 0 2px;
}

.author-info p {
    font-size: 0.875rem;
    color: var(--text-muted);
    margin: 0;
}


/* =========================================
   6. WHY CHOOSE US / FEATURES SECTION
   ========================================= */
.features {
    background: var(--dark);
}

.features-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.feature-content {
    /* text side */
}

.feature-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.feature-list li {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.75rem;
    align-items: flex-start;
}

.feature-list i {
    color: var(--primary);
    margin-top: 0.2rem;
    flex-shrink: 0;
    width: 22px;
    height: 22px;
}

.feature-list h4 {
    font-size: 1.05rem;
    margin-bottom: 0.35rem;
}

.feature-list p {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin: 0;
}

.feature-image img {
    width: 100%;
    border-radius: 20px;
    box-shadow: var(--shadow-premium);
    object-fit: cover;
}


/* =========================================
   7. PROCESS / HOW IT WORKS SECTION
   ========================================= */
.process-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
}

.process-item {
    text-align: center;
    position: relative;
}

/* Connecting line between steps on desktop */
.process-item:not(:last-child)::after {
    content: '';
    position: absolute;
    top: 30px;
    right: -1rem;
    width: calc(100% - 60px);
    height: 2px;
    background: linear-gradient(to right, var(--primary), transparent);
    opacity: 0.3;
    left: calc(50% + 30px);
}

.process-number {
    width: 60px;
    height: 60px;
    background: var(--gradient-primary);
    color: var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    margin: 0 auto 1.5rem;
    font-weight: 800;
    font-size: 1.4rem;
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.3);
}

.process-item h3 {
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
}

.process-item p {
    color: var(--text-muted);
    font-size: 0.95rem;
}


/* =========================================
   8. FAQ SECTION
   ========================================= */
.faq {
    background: var(--dark-light);
}

.faq-container {
    max-width: 800px;
    margin: 0 auto;
}

.faq-item {
    background: var(--dark);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    margin-bottom: 1rem;
    overflow: hidden;
    transition: var(--transition);
}

.faq-item:hover {
    border-color: rgba(59, 130, 246, 0.2);
}

.faq-question {
    padding: 1.5rem;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 600;
    font-size: 1rem;
    gap: 1rem;
    transition: var(--transition);
    -webkit-tap-highlight-color: transparent;
    user-select: none;
}

.faq-question i {
    transition: var(--transition);
    color: var(--primary);
    flex-shrink: 0;
    width: 20px;
    height: 20px;
}

.faq-answer {
    padding: 0 1.5rem;
    max-height: 0;
    overflow: hidden;
    color: var(--text-muted);
    font-size: 0.95rem;
    line-height: 1.7;
    transition: max-height 0.4s ease, padding 0.3s ease;
}

.faq-item.active .faq-answer {
    max-height: 300px;
    padding: 0 1.5rem 1.5rem;
}

.faq-item.active .faq-question {
    color: var(--primary);
}

.faq-item.active .faq-question i {
    transform: rotate(180deg);
}


/* =========================================
   9. RESPONSIVE — TABLET (max-width: 1024px)
   ========================================= */
@media (max-width: 1024px) {
    /* Hero */
    .hero-content {
        max-width: 600px;
    }

    /* Stats — keep 4 cols but tighter */
    .stats-grid {
        gap: 1.5rem;
    }

    .stat-item h3 {
        font-size: 2rem;
    }

    /* Features — stack at tablet */
    .features-grid {
        grid-template-columns: 1fr;
        gap: 3rem;
    }

    .feature-image {
        order: -1; /* Image on top */
    }

    .feature-image img {
        max-height: 380px;
        object-position: top;
    }

    /* Process — 2×2 grid */
    .process-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 2.5rem 3rem;
    }

    /* Remove connecting lines in 2-col layout */
    .process-item:not(:last-child)::after {
        display: none;
    }

    /* Services 2 cols */
    .services-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    /* Testimonials 2 cols */
    .testimonials-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}


/* =========================================
   10. RESPONSIVE — MOBILE (max-width: 768px)
   ========================================= */
@media (max-width: 768px) {
    /* ── Hero ── */
    .hero {
        min-height: auto;
        padding-top: 100px;
        padding-bottom: 60px;
    }

    .hero::before {
        /* On mobile, darken the overlay more so text stays legible */
        background:
            linear-gradient(to bottom, rgba(10, 22, 40, 0.96) 0%, rgba(10, 22, 40, 0.88) 100%),
            url('images/hero.webp');
        background-size: cover;
        background-position: top center;
    }

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

    .hero h1 {
        font-size: clamp(1.9rem, 8vw, 2.6rem);
        line-height: 1.2;
        margin-bottom: 1rem;
    }

    .hero > .container p,
    .hero-content > p {
        font-size: 1rem;
        margin-bottom: 2rem;
    }

    .hero-badge {
        font-size: 0.8rem;
        padding: 0.4rem 0.85rem;
        margin-bottom: 1rem;
    }

    .hero-btns {
        flex-direction: column;
        gap: 0.75rem;
    }

    .hero-btns .btn-primary,
    .hero-btns .btn-secondary {
        width: 100%;
        justify-content: center;
        padding: 0.9rem 1.5rem;
        font-size: 1rem;
    }

    .hero-disclaimer {
        padding: 0.75rem 1rem;
        margin-top: 1.25rem;
    }

    .hero-disclaimer p {
        font-size: 0.78rem !important;
    }

    /* ── Stats ── */
    .stats {
        padding: 2.5rem 0;
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.25rem;
    }

    .stat-item {
        background: var(--dark-card);
        border: 1px solid var(--glass-border);
        border-radius: 12px;
        padding: 1.25rem 1rem;
    }

    .stat-item h3 {
        font-size: 2rem;
        margin-bottom: 0.25rem;
    }

    .stat-item p {
        font-size: 0.875rem;
    }

    /* ── Brands ── */
    .brands {
        padding: 40px 0;
    }

    .brands-flex {
        gap: 1.25rem 2rem;
        justify-content: center;
        opacity: 1;
        filter: none;
    }

    .brand-logo {
        font-size: 1.1rem;
    }

    /* ── Services ── */
    .services-grid {
        grid-template-columns: 1fr;
        gap: 1.25rem;
    }

    .service-card {
        padding: 1.75rem;
        border-radius: 14px;
    }

    .service-icon {
        width: 52px;
        height: 52px;
        margin-bottom: 1.25rem;
    }

    .service-card h3 {
        font-size: 1.1rem;
    }

    /* ── Testimonials ── */
    .testimonials-grid {
        grid-template-columns: 1fr;
        gap: 1.25rem;
    }

    .testimonial-card {
        padding: 1.75rem;
    }

    /* ── Features / Why Choose Us ── */
    .features-grid {
        grid-template-columns: 1fr;
        gap: 2.5rem;
    }

    .feature-image {
        order: -1;
    }

    .feature-image img {
        border-radius: 14px;
        max-height: 280px;
        object-fit: cover;
        object-position: top;
    }

    .feature-list li {
        margin-bottom: 1.25rem;
    }

    /* ── Process ── */
    .process-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 2rem 1.5rem;
    }

    .process-number {
        width: 52px;
        height: 52px;
        font-size: 1.2rem;
        margin-bottom: 1rem;
    }

    .process-item h3 {
        font-size: 1rem;
    }

    /* ── FAQ ── */
    .faq-question {
        padding: 1.25rem;
        font-size: 0.95rem;
    }

    .faq-item.active .faq-answer {
        padding: 0 1.25rem 1.25rem;
    }
}


/* =========================================
   11. RESPONSIVE — SMALL MOBILE (max-width: 480px)
   ========================================= */
@media (max-width: 480px) {
    /* ── Hero ── */
    .hero {
        padding-top: 85px;
        padding-bottom: 50px;
    }

    .hero h1 {
        font-size: clamp(1.7rem, 9vw, 2.2rem);
    }

    .hero-badge {
        font-size: 0.75rem;
    }

    /* ── Stats ── */
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }

    .stat-item h3 {
        font-size: 1.7rem;
    }

    /* ── Brands ── */
    .brand-logo {
        font-size: 1rem;
    }

    /* ── Services ── */
    .service-card {
        padding: 1.5rem;
    }

    /* ── Testimonials ── */
    .testimonial-card {
        padding: 1.5rem;
    }

    /* ── Process: full-width on tiny screens ── */
    .process-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .process-item {
        display: flex;
        align-items: flex-start;
        text-align: left;
        gap: 1rem;
    }

    .process-number {
        margin: 0;
        flex-shrink: 0;
        width: 46px;
        height: 46px;
        font-size: 1.1rem;
    }

    .process-item-text {
        /* wrapper for h3+p if you want to add one — currently inline */
    }

    /* ── FAQ ── */
    .faq-question {
        padding: 1rem;
        font-size: 0.9rem;
    }

    .faq-item.active .faq-answer {
        padding: 0 1rem 1rem;
        font-size: 0.9rem;
    }

    /* ── Feature list ── */
    .feature-list li {
        gap: 0.75rem;
    }

    .feature-list h4 {
        font-size: 1rem;
    }

    /* ── Section header ── */
    .section-header {
        margin-bottom: 40px;
    }

    .section-header p {
        font-size: 1rem;
    }
}


/* =========================================
   12. RESPONSIVE — LANDSCAPE PHONES
   ========================================= */
@media (max-width: 768px) and (orientation: landscape) {
    .hero {
        min-height: auto;
        padding-top: 80px;
        padding-bottom: 40px;
    }

    .hero h1 {
        font-size: clamp(1.6rem, 5vw, 2.2rem);
    }
}
