/**
 * Main Theme CSS
 * REREC WordPress Theme
 */

:root {
    --primary: #f06725;
    --primary-dark: #d85515;
    --secondary: #0c713d;
    --topbar-bg: #ef6522;
    --text-main: #1e2f3e;
    --text-light: #556b7a;
    --gray-light: #f9fafb;
    --white: #ffffff;
    --shadow-sm: 0 4px 6px rgba(0,0,0,0.05);
    --shadow-md: 0 8px 20px rgba(0,0,0,0.08);
    --shadow-lg: 0 15px 30px rgba(0,0,0,0.12);
    --radius-md: 16px;
    --radius-lg: 32px;
    --transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    scroll-behavior: smooth;
}

body {
    font-family: 'Merriweather Sans', sans-serif;
    background: var(--white);
    color: var(--text-main);
    line-height: 1.6;
    overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Catamaran', sans-serif;
    font-weight: 700;
    color: var(--secondary);
}

a {
    text-decoration: none;
    transition: var(--transition);
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    display: block;
}

.container {
    max-width: 1250px;
    margin: 0 auto;
    padding: 0 24px;
}

.section-padding {
    padding: 80px 0;
}

/* Scroll Progress */
.scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    width: 0%;
    height: 4px;
    background: var(--primary);
    z-index: 9999;
    box-shadow: 0 0 10px rgba(240, 103, 37, 0.5);
}

/* Top Bar */
.top-bar {
    background: var(--topbar-bg);
    color: white;
    font-size: 12px;
    padding: 0;
    position: relative;
    z-index: 1001;
}

.top-bar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    max-width: 1400px;
    margin: 0 auto;
    padding: 8px 24px;
    min-height: 40px;
}

.tb-left {
    display: flex;
    align-items: center;
    flex: 1;
}

.tb-left span {
    color: white;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

.tb-left i {
    color: #ffd966;
}

.tb-center {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 18px;
}

.tb-center a {
    color: white;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 5px;
}

.tb-center a:hover {
    color: #ffd966;
}

.tb-right {
    display: flex;
    gap: 12px;
    align-items: center;
}

.tb-right a {
    color: white;
    font-size: 16px;
    transition: 0.2s;
}

.tb-right a:hover {
    color: #ffd966;
    transform: translateY(-2px);
}

/* Main Header */
.main-header {
    background: rgba(255,255,255,0.98);
    backdrop-filter: blur(10px);
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 0;
    z-index: 1000;
    padding: 5px 0;
}

.nav-container {
    display: grid;
    grid-template-columns: 3fr 8fr 1fr;
    align-items: center;
    max-width: auto !important;
    margin: 0 auto;
    padding: 0 4px;
    height: 80px;
}

.logo img {
    height: 68px;
    width: auto;
    object-fit: contain;
}

.nav-menu {
    display: flex;
    justify-content: flex-start;
    gap: 2px;
    align-items: center;
    height: 100%;
    margin: 0;
    padding: 0;
    list-style: none;
}

.nav-menu > li {
    position: relative;
    height: 100%;
    display: flex;
    align-items: center;
}

.nav-menu > li > a {
    font-family: 'Catamaran', sans-serif;
    font-weight: 700;
    font-size: 13px;
    padding: 10px 12px;
    color: var(--text-main);
    text-transform: uppercase;
    border-radius: 4px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.nav-menu > li:hover > a,
.nav-menu > li.current-menu-item > a {
    color: var(--primary);
    background: rgba(240, 103, 37, 0.05);
}

.nav-menu > li.menu-item-has-children > a::after {
    content: '\f107';
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    font-size: 10px;
    display: inline-block;
    margin-left: 4px;
}

.sub-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background: white;
    min-width: 240px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    border-top: 3px solid var(--primary);
    border-radius: 0 0 8px 8px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(15px);
    transition: all 0.3s ease;
    z-index: 1001;
    padding: 10px 0;
    list-style: none;
}

.nav-menu > li:hover > .sub-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.sub-menu li a {
    display: block;
    padding: 12px 20px;
    color: var(--text-main);
    font-size: 13px;
    font-weight: 500;
    border-bottom: 1px solid rgba(0,0,0,0.03);
}

.sub-menu li a:hover {
    background: #f9f9f9;
    color: var(--primary);
    padding-left: 25px;
}

.search-column {
    display: flex;
    justify-content: flex-end;
    align-items: center;
}

.search-icon a {
    background: var(--secondary);
    color: white;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: 0.3s;
}

.search-icon a:hover {
    background: var(--primary);
    transform: rotate(90deg);
}

.mobile-menu-icon {
    display: none;
    font-size: 24px;
    cursor: pointer;
    color: var(--secondary);
}

/* Hero Section */
.hero-section {
    position: relative;
    height: 90vh;
    min-height: 600px;
    width: 100%;
    background-image: url('https://new.rerec.co.ke/wp-content/uploads/2023/07/RURALELECTRIFICATION-1.jpg');
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    color: white;
    overflow: hidden;
}

.hero-bg-layer {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    z-index: 1;
}

.hero-bg-layer.active {
    z-index: 2;
    opacity: 1;
}

.hero-bg-layer:not(.active) {
    z-index: 1;
    opacity: 0;
    pointer-events: none;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    z-index: 10;
    background: linear-gradient(90deg, rgba(12, 113, 61, 0.9) 0%, rgba(12, 113, 61, 0.3) 60%, rgba(0,0,0,0.1) 100%);
}

.side-social {
    position: absolute;
    left: 30px;
    bottom: 30%;
    display: flex;
    flex-direction: column;
    gap: 12px;
    z-index: 30;
    background: rgba(0,0,0,0.5);
    padding: 10px;
    border-radius: 30px;
    backdrop-filter: blur(5px);
}

.side-social a {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    color: white;
    font-size: 18px;
    border: 1px solid rgba(255,255,255,0.3);
    transition: 0.3s;
}

.side-social a:hover {
    background: var(--primary);
    transform: scale(1.1);
    border-color: var(--primary);
}

.hero-content {
    position: relative;
    z-index: 20;
    max-width: 700px;
    padding: 40px;
    border-left: 6px solid var(--primary);
    background: rgba(255,255,255,0.1);
    backdrop-filter: blur(8px);
    margin-left: 5%;
    opacity: 0;
    transform: translateY(30px);
    animation: slideUpFade 1s forwards 0.5s;
    border-top-right-radius: 20px;
    border-bottom-right-radius: 20px;
}

.hero-content h1 {
    color: white;
    font-size: 3.5rem;
    line-height: 1.1;
    margin-bottom: 20px;
    text-shadow: 0 2px 10px rgba(0,0,0,0.5);
}

.hero-content p {
    font-size: 1.25rem;
    font-weight: 500;
    margin-bottom: 30px;
    text-shadow: 0 2px 4px rgba(0,0,0,0.5);
}

.btn-hero {
    background: var(--primary);
    color: white;
    padding: 14px 36px;
    border-radius: 50px;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    text-transform: uppercase;
    letter-spacing: 1px;
    box-shadow: 0 4px 15px rgba(240, 103, 37, 0.4);
    border: none;
    cursor: pointer;
}

.btn-hero:hover {
    background: white;
    color: var(--primary);
    transform: translateY(-3px);
}

/* Section Title */
.section-title {
    text-align: center;
    margin-bottom: 50px;
}

.section-title h2 {
    font-size: 2.5rem;
    margin-bottom: 15px;
    position: relative;
    display: inline-block;
}

.section-title h2::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 4px;
    background: var(--primary);
    border-radius: 2px;
}

.section-title p {
    color: var(--text-light);
    max-width: 700px;
    margin: 20px auto 0;
    font-size: 1.05rem;
}

/* Cards */
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 20px;
}

.card {
    background: var(--white);
    padding: 40px 30px;
    border-radius: var(--radius-lg);
    text-align: center;
    border: 1px solid rgba(0,0,0,0.03);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 6px;
    background: linear-gradient(90deg, var(--secondary), var(--primary));
    transform: scaleX(0);
    transform-origin: left;
    transition: 0.4s ease;
}

.card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-lg);
}

.card:hover::before {
    transform: scaleX(1);
}

.card i {
    font-size: 56px;
    color: var(--primary);
    margin-bottom: 20px;
    display: inline-block;
    transition: 0.4s;
}

.card:hover i {
    transform: scale(1.1) rotate(5deg);
}

.card h3 {
    margin-bottom: 15px;
    font-size: 1.4rem;
}

.btn-outline {
    display: inline-block;
    margin-top: 20px;
    padding: 10px 24px;
    border: 2px solid var(--secondary);
    color: var(--secondary);
    border-radius: 50px;
    font-weight: 700;
    font-size: 14px;
    background: transparent;
    cursor: pointer;
    transition: var(--transition);
}

.btn-outline:hover {
    background: var(--secondary);
    color: white;
}

/* Services */
.services-wrap {
    background: linear-gradient(to bottom, #f1f8f4, #ffffff);
}

.service-layout {
    display: flex;
    flex-wrap: wrap;
    gap: 50px;
    align-items: center;
}

.service-content {
    flex: 1;
    min-width: 350px;
}

.service-list {
    width: 100%;
    display: flex;
    flex-direction: column;
}

.service-list li {
    display: flex;
    align-items: center;
    gap: 20px;
    font-weight: 600;
    font-size: 1.1rem;
    color: var(--text-main);
    padding: 15px 0;
    min-height: 60px;
}

.service-list li i {
    color: var(--primary);
    font-size: 24px;
    width: 24px;
    text-align: center;
}

.service-visuals {
    flex: 1;
    min-width: 350px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.service-visuals img {
    width: 100%;
    height: 220px;
    object-fit: cover;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

.service-visuals img:hover {
    transform: scale(1.03);
    box-shadow: var(--shadow-md);
}

.service-visuals img:nth-child(2) {
    margin-top: 30px;
}

.service-visuals img:nth-child(3) {
    margin-bottom: 30px;
}

/* Strategic Plan */
.strat-block {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 40px;
    background: var(--white);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-md);
}

.strat-img {
    flex: 1;
    min-width: 300px;
    height: 400px;
}

.strat-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.strat-text {
    flex: 1;
    padding: 40px;
    min-width: 300px;
}

.strat-text ul {
    margin: 20px 0;
}

.strat-text li {
    margin-bottom: 12px;
    display: flex;
    gap: 10px;
}

.strat-text li i {
    color: var(--secondary);
    margin-top: 5px;
}

/* Swiper */
.swiper-slide img {
    width: 100%;
    border-radius: var(--radius-md);
    display: block;
}

.swiper-pagination-bullet-active {
    background: var(--primary) !important;
}

/* Testimonials */
.testimonials {
    background: var(--gray-light);
}

.testimonial-card {
    background: white;
    padding: 30px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    position: relative;
}

.quote-icon {
    position: absolute;
    top: 20px;
    right: 20px;
    font-size: 40px;
    color: rgba(12, 113, 61, 0.1);
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-top: 20px;
}

.user-profile img {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    border: 3px solid var(--primary);
    object-fit: cover;
}

/* Footer */
.footer {
    background: #1a1a1a;
    color: #ccc;
    padding: 70px 0 30px;
    font-size: 14px;
}

.footer h4 {
    color: white;
    margin-bottom: 25px;
    font-size: 1.2rem;
    letter-spacing: 0.5px;
}

.footer-col {
    margin-bottom: 30px;
}

.footer-col ul li {
    margin-bottom: 12px;
}

.footer-col a {
    color: #bbb;
}

.footer-col a:hover {
    color: var(--primary);
    padding-left: 5px;
}

.footer-contact i {
    width: 25px;
    color: var(--primary);
}

.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.1);
    margin-top: 50px;
    padding-top: 25px;
    text-align: center;
}

/* Back to Top */
#backToTop {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: var(--primary);
    color: white;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0;
    pointer-events: none;
    transition: 0.3s;
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
    z-index: 999;
}

#backToTop.visible {
    opacity: 1;
    pointer-events: all;
}

/* Animations */
@keyframes slideUpFade {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: all 0.8s ease;
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

/* Responsive */
@media (max-width: 1200px) {
    .nav-container {
        grid-template-columns: 200px 1fr 50px;
    }
    .nav-menu {
        gap: 2px;
    }
    .nav-menu > li > a {
        padding: 10px 8px;
        font-size: 12px;
    }
}

@media (max-width: 992px) {
    .mobile-menu-icon {
        display: block;
    }
    
    .nav-container {
        display: flex;
        justify-content: space-between;
        height: auto;
    }
    
    .nav-menu {
        position: fixed;
        top: 70px;
        left: -100%;
        width: 80%;
        height: calc(100vh - 70px);
        background: white;
        flex-direction: column;
        padding: 20px;
        box-shadow: 0 10px 20px rgba(0,0,0,0.1);
        transition: 0.4s ease;
        z-index: 999;
        overflow-y: auto;
    }
    
    .nav-menu.show {
        left: 0;
    }
    
    .nav-menu > li {
        width: 100%;
        display: block;
        height: auto;
    }
    
    .nav-menu > li > a {
        width: 100%;
        justify-content: space-between;
        padding: 15px 20px;
        border-bottom: 1px solid #eee;
    }
    
    .sub-menu {
        position: static;
        visibility: visible;
        opacity: 1;
        transform: none;
        box-shadow: none;
        border-top: none;
        background: #f9f9f9;
        display: none;
    }
    
    .nav-menu > li:hover > .sub-menu {
        display: block;
    }
    
    .top-bar .container {
        justify-content: center;
        gap: 10px;
        padding: 10px;
        height: auto;
    }
    
    .tb-left, .tb-center {
        display: none;
    }
    
    .tb-right {
        width: 100%;
        justify-content: center;
        gap: 15px;
    }
}

@media (max-width: 768px) {
    .hero-content h1 {
        font-size: 2rem;
    }
    
    .hero-content p {
        font-size: 1rem;
    }
    
    .hero-content {
        margin: 0 20px;
        padding: 30px;
    }
    
    .section-title h2 {
        font-size: 2rem;
    }
    
    .service-layout {
        flex-direction: column;
    }
    
    .service-list {
        width: 100%;
    }
    
    .service-visuals {
        grid-template-columns: 1fr;
    }
    
    .service-visuals img {
        margin: 0 !important;
        height: 200px;
    }
    
    .strat-block {
        flex-direction: column;
    }
    
    .section-padding {
        padding: 50px 0;
    }
    
    .side-social {
        left: 10px;
        bottom: 20%;
        padding: 8px;
        gap: 8px;
    }
    
    .side-social a {
        width: 35px;
        height: 35px;
        font-size: 16px;
    }
}

@media (max-width: 480px) {
    .hero-content h1 {
        font-size: 1.5rem;
    }
    
    .hero-content {
        padding: 20px;
    }
    
    .btn-hero {
        padding: 10px 20px;
        font-size: 12px;
    }
    
    .card {
        padding: 30px 20px;
    }
}
