/*
Theme Name: Cap Energy
Theme URI: https://capenergy.co.za
Author: Cap Energy Team
Author URI: https://capenergy.co.za
Description: A professional WordPress theme for Cap Energy - Premium Bulk Fuel Supply & Logistics Solutions
Version: 1.0.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: capenergy
*/

/* ============================================
   CSS VARIABLES & ROOT STYLES
   ============================================ */
:root {
    /* Brand Colors - Based on Cap Energy Logo */
    --primary-navy: #1e3a8a;
    --primary-red: #dc2626;
    --accent-blue: #3b82f6;
    --text-dark: #1f2937;
    --text-light: #6b7280;
    --bg-light: #f9fafb;
    --white: #ffffff;
    --border-gray: #e5e7eb;

    /* Typography */
    --font-primary: 'Inter', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    --font-secondary: 'Poppins', sans-serif;

    /* Spacing */
    --section-padding: 80px 0;
    --container-max-width: 1200px;

    /* Transitions */
    --transition-smooth: all 0.3s ease;
}

/* ============================================
   RESET & BASE STYLES
   ============================================ */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-primary);
    font-size: 16px;
    line-height: 1.6;
    color: var(--text-dark);
    background-color: var(--white);
    overflow-x: hidden;
}

a {
    color: var(--primary-navy);
    text-decoration: none;
    transition: var(--transition-smooth);
}

a:hover {
    color: var(--primary-red);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

ul {
    list-style: none;
}

/* ============================================
   CONTAINER & LAYOUT
   ============================================ */
.container {
    max-width: var(--container-max-width);
    margin: 0 auto;
    padding: 0 20px;
}

.section {
    padding: var(--section-padding);
}

.section-title {
    font-family: var(--font-secondary);
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary-navy);
    text-align: center;
    margin-bottom: 3rem;
    position: relative;
}

.section-title::after {
    content: '';
    display: block;
    width: 80px;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-red), var(--primary-navy));
    margin: 1rem auto 0;
    border-radius: 2px;
}

/* ============================================
   BUTTONS
   ============================================ */
.btn {
    display: inline-block;
    padding: 14px 32px;
    font-weight: 600;
    font-size: 1rem;
    border-radius: 50px;
    transition: var(--transition-smooth);
    cursor: pointer;
    border: 2px solid transparent;
    text-align: center;
}

.btn-primary {
    background: var(--primary-red);
    color: var(--white);
    border-color: var(--primary-red);
}

.btn-primary:hover {
    background: transparent;
    color: var(--primary-red);
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(220, 38, 38, 0.2);
}

.btn-secondary {
    background: var(--primary-navy);
    color: var(--white);
    border-color: var(--primary-navy);
}

.btn-secondary:hover {
    background: transparent;
    color: var(--primary-navy);
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(30, 58, 138, 0.2);
}

.btn-outline {
    background: transparent;
    color: var(--primary-navy);
    border-color: var(--primary-navy);
}

.btn-outline:hover {
    background: var(--primary-navy);
    color: var(--white);
}

/* ============================================
   HEADER & NAVIGATION
   ============================================ */
.site-header {
    background: var(--white);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
    transition: var(--transition-smooth);
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 20px;
}

.logo {
    max-width: 200px;
    height: auto;
}

.main-navigation ul {
    display: flex;
    gap: 2rem;
}

.main-navigation a {
    font-weight: 500;
    color: var(--text-dark);
    padding: 0.5rem 1rem;
    position: relative;
}

.main-navigation a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 3px;
    background: var(--primary-red);
    transition: width 0.3s ease;
}

.main-navigation a:hover::after,
.main-navigation a.active::after {
    width: 100%;
}

.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--primary-navy);
}

/* ============================================
   HERO SECTION
   ============================================ */
.hero-section {
    background: linear-gradient(135deg, var(--primary-navy) 0%, #2563eb 100%);
    color: var(--white);
    padding: 100px 0;
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg width="100" height="100" xmlns="http://www.w3.org/2000/svg"><circle cx="50" cy="50" r="2" fill="white" opacity="0.1"/></svg>');
    opacity: 0.3;
}

.hero-content {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.hero-text h1 {
    font-family: var(--font-secondary);
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    line-height: 1.2;
}

.hero-text .highlight {
    color: var(--primary-red);
}

.hero-text p {
    font-size: 1.25rem;
    margin-bottom: 2rem;
    opacity: 0.9;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.hero-image {
    position: relative;
}

.hero-image img {
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

/* ============================================
   SERVICES SECTION
   ============================================ */
.services-section {
    background: var(--bg-light);
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.service-card {
    background: var(--white);
    padding: 2.5rem;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
    transition: var(--transition-smooth);
    border-top: 4px solid var(--primary-red);
}

.service-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15);
}

.service-icon {
    font-size: 3rem;
    color: var(--primary-navy);
    margin-bottom: 1.5rem;
}

.service-card h3 {
    font-family: var(--font-secondary);
    font-size: 1.5rem;
    color: var(--primary-navy);
    margin-bottom: 1rem;
}

.service-card p {
    color: var(--text-light);
    line-height: 1.8;
}

/* ============================================
   ABOUT SECTION
   ============================================ */
.about-section {
    background: var(--white);
}

.about-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.about-image {
    position: relative;
}

.about-image img {
    border-radius: 15px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
}

.about-text h2 {
    font-family: var(--font-secondary);
    font-size: 2.5rem;
    color: var(--primary-navy);
    margin-bottom: 1.5rem;
}

.about-text p {
    color: var(--text-light);
    margin-bottom: 1.5rem;
    line-height: 1.8;
}

.about-features {
    display: grid;
    gap: 1rem;
    margin-top: 2rem;
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.feature-icon {
    width: 50px;
    height: 50px;
    background: var(--primary-red);
    color: var(--white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    flex-shrink: 0;
}

.feature-item p {
    margin: 0;
    font-weight: 500;
}

/* ============================================
   CONTACT SECTION
   ============================================ */
.contact-section {
    background: var(--bg-light);
}

.contact-wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
}

.contact-info h3 {
    font-family: var(--font-secondary);
    font-size: 2rem;
    color: var(--primary-navy);
    margin-bottom: 1.5rem;
}

.contact-details {
    display: grid;
    gap: 2rem;
    margin-top: 2rem;
}

.contact-item {
    display: flex;
    align-items: flex-start;
    gap: 1.5rem;
}

.contact-icon {
    width: 50px;
    height: 50px;
    background: var(--primary-red);
    color: var(--white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    flex-shrink: 0;
}

.contact-item-content h4 {
    color: var(--primary-navy);
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.contact-item-content p {
    color: var(--text-light);
    margin: 0;
}

.contact-form {
    background: var(--white);
    padding: 2.5rem;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    font-weight: 600;
    color: var(--primary-navy);
    margin-bottom: 0.5rem;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid var(--border-gray);
    border-radius: 8px;
    font-family: var(--font-primary);
    font-size: 1rem;
    transition: var(--transition-smooth);
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-navy);
    box-shadow: 0 0 0 3px rgba(30, 58, 138, 0.1);
}

.form-group textarea {
    resize: vertical;
    min-height: 150px;
}

/* ============================================
   FOOTER
   ============================================ */
.site-footer {
    background: var(--primary-navy);
    color: var(--white);
    padding: 3rem 0 1.5rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 3rem;
    margin-bottom: 2rem;
}

.footer-section h3 {
    font-family: var(--font-secondary);
    font-size: 1.25rem;
    margin-bottom: 1.5rem;
    color: var(--white);
}

.footer-section p,
.footer-section a {
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 0.5rem;
}

.footer-section a:hover {
    color: var(--primary-red);
}

.social-links {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

.social-links a {
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition-smooth);
}

.social-links a:hover {
    background: var(--primary-red);
    transform: translateY(-3px);
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 1.5rem;
    text-align: center;
    color: rgba(255, 255, 255, 0.7);
}

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */
@media (max-width: 968px) {
    .hero-content,
    .about-content,
    .contact-wrapper {
        grid-template-columns: 1fr;
    }

    .hero-text h1 {
        font-size: 2.5rem;
    }

    .section-title {
        font-size: 2rem;
    }

    .main-navigation {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--white);
        box-shadow: 0 5px 10px rgba(0, 0, 0, 0.1);
        padding: 1rem;
    }

    .main-navigation.active {
        display: block;
    }

    .main-navigation ul {
        flex-direction: column;
        gap: 0;
    }

    .main-navigation a {
        display: block;
        padding: 1rem;
    }

    .mobile-menu-toggle {
        display: block;
    }

    .services-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 600px) {
    .hero-text h1 {
        font-size: 2rem;
    }

    .hero-text p {
        font-size: 1rem;
    }

    .hero-buttons {
        flex-direction: column;
    }

    .btn {
        width: 100%;
    }
}

/* ============================================
   SERVICE CARD IMAGES
   ============================================ */
.service-image {
    width: 100%;
    height: 200px;
    overflow: hidden;
    border-radius: 10px;
    margin-bottom: 1.5rem;
}

.service-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.service-card:hover .service-image img {
    transform: scale(1.1);
}

/* ============================================
   FLEET GALLERY SECTION
   ============================================ */
.fleet-section {
    background: var(--white);
}

.section-subtitle {
    text-align: center;
    font-size: 1.1rem;
    color: var(--text-light);
    margin-top: -2rem;
    margin-bottom: 3rem;
}

.fleet-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.fleet-item {
    position: relative;
    overflow: hidden;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    transition: var(--transition-smooth);
}

.fleet-item:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.2);
}

.fleet-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.fleet-item:hover img {
    transform: scale(1.1);
}

@media (max-width: 768px) {
    .fleet-gallery {
        grid-template-columns: 1fr;
    }
}
