:root {
    --primary-color: #00b8d4;
    --secondary-color: #005766;
    --text-color: #333;
    --background-color: #000000;
    --light-gray: #f5f5f5;
    --dark-gray: #000000;
    --white: #fff;
    --transition: all 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', sans-serif;
    line-height: 1.6;
    color: var(--white);
    background-color: var(--background-color);
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
    position: relative;
}

body::after {
    display: none;
}

.container {
    max-width: 1120px;
    margin: 0 auto;
    padding: 0 25px;
}

/* Header Styles */
header {
    background-color: rgba(0, 0, 0, 0.7);
    box-shadow: 0 2px 5px rgba(0,0,0,0.3);
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
}

.logo {
    color: var(--white);
    font-size: 1.5rem;
    font-weight: 700;
    text-decoration: none;
    letter-spacing: 1px;
    display: flex;
    align-items: center;
}

.logo img {
    height: auto;
    max-width: 250px;
    margin-right: 10px;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-link {
    color: var(--white);
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
}

.nav-link:hover {
    color: var(--primary-color);
}

.mobile-menu-button {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
}

.mobile-menu-button .bar {
    display: block;
    width: 25px;
    height: 3px;
    margin: 5px auto;
    background-color: var(--white);
    transition: var(--transition);
}

.mobile-menu-button.active .bar:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
}

.mobile-menu-button.active .bar:nth-child(2) {
    opacity: 0;
}

.mobile-menu-button.active .bar:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
}

/* Hero Section */
.hero {
    background-color: #000000;
    padding: 8rem 0 5rem;
    color: var(--white);
    position: relative;
    overflow: hidden;
    /* Centered background image */
    background-image: url('../img/energy-hero.jpg');
    background-size: 40%; /* Reduced from cover to a percentage */
    background-position: center center; /* Center horizontally and vertically */
    background-repeat: no-repeat;
}

/* Dark overlay for only part of the hero section */
.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 45%; /* Only cover part of the background where image is */
    height: 100%;
    background-color: rgba(0, 0, 0, 0.75); /* Darker overlay */
    z-index: 1;
}

.hero-wrapper {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    position: relative;
    z-index: 2; /* Place above the overlay */
}

.hero-content {
    flex: 0 0 42.5%;
    max-width: 42.5%;
    padding-right: 2rem;
    position: relative;
}

/* Remove the previous background approach */
.hero-content::before,
.hero-content::after {
    display: none;
}

.hero-video {
    flex: 0 0 57.5%;
    max-width: 57.5%;
    padding-left: 2rem;
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Video section styles */
.video-container {
    position: relative;
    width: 100%;
    border-radius: 0;
    overflow: hidden;
    box-shadow: none;
    border: 4px solid var(--primary-color);
    height: 0;
    padding-bottom: 72.6%;
}

.video-container video {
    width: 100%;
    display: block;
    cursor: pointer;
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    object-fit: contain;
}

.video-captions {
    position: absolute;
    bottom: 60px;
    left: 0;
    width: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 10px;
    text-align: center;
    z-index: 10;
    font-size: 16px;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.8);
    display: none;
}

.video-captions.active {
    display: block !important;
    border-top: none;
    box-shadow: none;
}

/* Video Controls */
.custom-video-controls {
    position: absolute;
    bottom: 10px;
    width: calc(100% - 20px);
    margin: 0 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 100;
    opacity: 1;
    transition: opacity 0.3s ease;
}

.hidden {
    opacity: 0;
    transition: opacity 0.5s ease;
}

.custom-video-controls.hidden {
    opacity: 0.1;
    transition: opacity 0.3s ease;
}

.video-controls-left {
    display: flex;
    align-items: center;
}

.video-controls-right {
    display: flex;
    align-items: center;
    gap: 15px;
}

.video-control-btn {
    background: rgba(0, 0, 0, 0.7);
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
    font-size: 0.75em;
    cursor: pointer;
    transition: all 0.3s ease;
    padding: 4px 8px;
    border-radius: 50%;
    box-shadow: 0 0 10px rgba(0, 184, 212, 0.3);
    z-index: 60;
    pointer-events: auto;
    position: relative;
}

.video-control-btn:hover, 
.video-control-btn.active {
    background: var(--primary-color);
    color: white;
    transform: scale(1.1);
    box-shadow: 0 0 15px rgba(0, 184, 212, 0.6);
}

/* Poster effect for video */
video::-webkit-media-controls {
    display: none !important;
}

video::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #000;
    z-index: 1;
}

/* Video Play Overlay */
.video-play-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.4);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 50;
    cursor: pointer;
    transition: all 0.3s ease;
}

.video-play-overlay i {
    font-size: 6rem;
    color: var(--primary-color);
    opacity: 0.8;
    filter: drop-shadow(0 0 8px rgba(0, 0, 0, 0.8));
    transition: all 0.3s ease;
}

.video-play-overlay:hover i {
    transform: scale(1.1);
    opacity: 1;
    color: white;
}

/* Video Progress Bar */
.video-progress-container {
    position: absolute;
    bottom: 50px;
    width: calc(100% - 20px);
    margin: 0 10px;
    height: 4px;
    background-color: rgba(255, 255, 255, 0.3);
    border-radius: 2px;
    cursor: pointer;
    z-index: 10;
    opacity: 1;
    transition: opacity 0.3s ease;
}

.video-progress-container.hidden {
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.video-progress-bar {
    height: 100%;
    background-color: var(--primary-color);
    border-radius: 2px;
    width: 0;
}

/* Progress Bar Hover Effect */
.video-progress-container:hover {
    height: 8px;
    cursor: pointer;
}

/* Captions button */
.cc-button {
    background: none;
    border: none;
    color: white;
    font-size: 1.5em;
    cursor: pointer;
    transition: color 0.3s;
    padding: 5px 12px;
    border-radius: 50%;
    background-color: rgba(0, 0, 0, 0.4);
}

.cc-button:hover, 
.cc-button.active {
    color: var(--primary-color);
}

/* Fallback image styling */
.fallback-img {
    width: 100%;
    height: 100%;
    min-height: 300px;
    object-fit: cover;
    display: none; /* Hidden by default, shown if video fails */
}

.hero-title {
    font-size: 3rem;
    margin-bottom: 1.6rem;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.9), 0 0 30px rgba(0, 184, 212, 0.5);
    line-height: 1.2;
}

.hero-text {
    font-size: 1.1rem;
    margin-bottom: 2.5rem;
    opacity: 0.9;
    max-width: 600px;
}

/* Media query for mobile view */
@media (max-width: 768px) {
    .hero {
        background-position: center;
    }
    
    .hero-wrapper {
        flex-direction: column;
    }
    
    .hero-content {
        flex: 0 0 100%;
        max-width: 100%;
        padding-right: 0;
        margin-bottom: 2rem;
        text-align: center;
    }
    
    .hero-video {
        flex: 0 0 100%;
        max-width: 100%;
        padding-left: 0;
        padding-right: 0;
        width: 100%;
    }
    
    .video-container {
        width: 103.5%;
        min-height: 264px;
    }
    
    .hero-video video {
        min-height: 264px;
    }
    
    .fallback-img {
        min-height: 264px;
    }
    
    .hero-title {
        font-size: 2rem;
    }
    
    .custom-video-controls {
        bottom: 15px;
        padding: 10px;
    }
    
    .video-control-btn {
        width: 40px;
        height: 40px;
    }
    
    .video-control-btn i {
        font-size: 16px;
    }
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.8rem 2rem;
    background-color: var(--primary-color);
    color: var(--white);
    text-decoration: none;
    border-radius: 5px;
    font-weight: 600;
    transition: var(--transition);
    box-shadow: 0 0 15px rgba(0, 184, 212, 0.5);
    text-shadow: none;
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 0 20px rgba(0, 184, 212, 0.8);
    background-color: #009bb4;
}

/* Sections */
section {
    padding: 5.5rem 0;
}

.section-title {
    text-align: center;
    margin-bottom: 2.4rem;
}

.section-title h2 {
    font-size: 1.8rem;
    color: var(--primary-color);
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.7);
}

/* About Section */
.about {
    background-color: #000000;
    color: var(--white);
}

.about-content {
    max-width: 900px;
    margin: 0 auto;
    text-align: center;
    font-size: 1.1rem;
    line-height: 1.8;
}

/* Services Section */
.services-container {
    display: grid !important;
    grid-template-columns: repeat(2, 1fr) !important;
    grid-template-rows: repeat(2, auto) !important;
    grid-template-areas: 
        "item1 item2"
        "item3 item4" !important;
    gap: 2.4rem !important;
    max-width: 900px;
    margin: 0 auto;
}

/* Make sure no floating or flexbox behaviors interfere */
.services-container::before,
.services-container::after {
    display: none !important;
}

.item1 { grid-area: item1 !important; }
.item2 { grid-area: item2 !important; }
.item3 { grid-area: item3 !important; }
.item4 { grid-area: item4 !important; }

.service-item {
    width: 100%;
    height: 100%;
    background: #101010;
    padding: 1.6rem 1.2rem;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
    transition: var(--transition);
    text-align: center;
    color: var(--white);
    position: relative;
    overflow: hidden;
}

.service-item:hover {
    transform: translateY(-5px);
}

.service-item:hover::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: var(--primary-color);
    box-shadow: 0 0 15px 3px rgba(0, 184, 212, 0.7);
    animation: glowPulse 1.5s infinite alternate;
}

@keyframes glowPulse {
    0% {
        box-shadow: 0 0 10px 1px rgba(0, 184, 212, 0.7);
    }
    100% {
        box-shadow: 0 0 20px 3px rgba(0, 184, 212, 0.9);
    }
}

.service-icon {
    font-size: 2rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
    text-shadow: 0 0 15px rgba(0, 184, 212, 0.7);
}

.service-title {
    font-size: 1.1rem;
    margin-bottom: 0.6rem;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.7);
}

.service-description {
    font-size: 0.9rem;
    line-height: 1.4;
}

/* Mobile responsiveness for services */
@media (max-width: 768px) {
    .services-container {
        grid-template-columns: 1fr !important;
        grid-template-areas: 
            "item1"
            "item2"
            "item3"
            "item4" !important;
    }
}

.services {
    background-color: #050505;
}

/* Pricing Section */
.pricing {
    background-color: #000000;
    color: var(--white);
}

.pricing-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 2.4rem;
}

.pricing-item {
    background: #101010;
    padding: 2.4rem 1.6rem;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
    color: var(--white);
    transition: all 0.3s ease;
    position: relative;
    border: 2px solid transparent;
    height: 100%;
    display: flex;
    flex-direction: column;
}

/* Make all pricing items look the same */
.pricing-item.popular {
    background-color: #101010;
    transform: none;
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
    border: 2px solid transparent;
    z-index: 1;
}

/* Glowing border class that gets applied via JavaScript */
.pricing-item.glowing-border {
    border: 2px solid var(--primary-color);
    box-shadow: 0 0 25px rgba(0, 184, 212, 0.5);
    transition: all 0.3s ease;
}

.pricing-header {
    text-align: center;
    margin-bottom: 1.5rem;
}

.pricing-title {
    color: var(--primary-color);
    font-size: 1.4rem;
    margin-bottom: 0.8rem;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.7);
}

.pricing-features {
    list-style: none;
    margin-bottom: 2rem;
    text-align: center;
    flex: 1;
}

.pricing-feature {
    padding: 0.6rem 0;
    border-bottom: 1px solid #444;
    font-size: 0.9rem;
    text-align: center;
}

.pricing-action {
    text-align: center;
    margin-top: auto;
}

/* FAQ Section */
.faq-container {
    max-width: 640px;
    margin: 0 auto;
}

.faq {
    background-color: #050505;
}

.faq-item {
    margin-bottom: 1.2rem;
    border: 1px solid #333;
    border-radius: 4px;
    overflow: hidden;
    background-color: #101010;
}

.faq-question {
    padding: 1.2rem;
    background: #090909;
    font-weight: 600;
    cursor: pointer;
    position: relative;
    color: var(--white);
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.7);
    font-size: 0.95rem;
}

.faq-question:after {
    content: '+';
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.5rem;
    color: var(--primary-color);
    text-shadow: 0 0 10px rgba(0, 184, 212, 0.7);
}

.faq-question.active:after {
    content: '-';
}

.faq-answer {
    padding: 1.2rem;
    display: none;
    background: #101010;
    color: var(--white);
    font-size: 0.9rem;
}

/* Contact Section */
.contact {
    background-color: #000000;
    color: var(--white);
}

.contact-container {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 3rem;
}

.contact-info {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.contact-detail {
    display: flex;
    align-items: center;
    margin-bottom: 1.5rem;
}

.contact-icon {
    font-size: 2rem;
    color: var(--primary-color);
    margin-right: 1rem;
    text-shadow: 0 0 15px rgba(0, 184, 212, 0.7);
}

.contact-form input,
.contact-form textarea {
    width: 100%;
    padding: 1rem;
    margin-bottom: 1.5rem;
    border: 1px solid #333;
    border-radius: 5px;
    background-color: #101010;
    color: var(--white);
    font-size: 1rem;
}

.contact-form textarea {
    min-height: 150px;
    resize: vertical;
}

.contact-form input::placeholder,
.contact-form textarea::placeholder {
    color: #aaa;
}

.contact-form button {
    background-color: var(--primary-color);
    color: var(--white);
    border: none;
    cursor: pointer;
}

.contact-form button:hover {
    background-color: var(--secondary-color);
}

/* Footer */
footer {
    background: #050505;
    color: var(--white);
    padding: 5rem 0 3rem;
}

.footer-container {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 3rem;
}

.footer-logo {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--primary-color);
    display: flex;
    align-items: center;
}

.footer-logo img {
    height: auto;
    max-width: 200px;
}

.footer-links h3 {
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.footer-links ul {
    list-style: none;
}

.footer-links li {
    margin-bottom: 0.5rem;
}

.footer-links a {
    color: var(--white);
    text-decoration: none;
    opacity: 0.8;
    transition: var(--transition);
}

.footer-links a:hover {
    opacity: 1;
    color: var(--primary-color);
}

.footer-about p {
    margin-bottom: 1.5rem;
    font-size: 1.05rem;
    line-height: 1.6;
    opacity: 0.9;
}

.copyright {
    text-align: center;
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid rgba(255,255,255,0.1);
    font-size: 0.9rem;
    opacity: 0.8;
}

/* Responsive Design */
@media (max-width: 768px) {
    .mobile-menu-button {
        display: block;
    }
    
    .nav-menu {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: rgba(0, 0, 0, 0.9);
        padding: 1rem;
        flex-direction: column;
        text-align: center;
        box-shadow: 0 5px 10px rgba(0,0,0,0.3);
    }
    
    .nav-menu.active {
        display: flex;
    }
    
    .nav-item {
        margin: 0.5rem 0;
    }
    
    .contact-container,
    .footer-container {
        grid-template-columns: 1fr;
    }
    
    .pricing-item.popular {
        transform: none;
    }
    
    .hero-wrapper {
        flex-direction: column;
    }
    
    .hero-content {
        flex: 0 0 100%;
        max-width: 100%;
        padding-right: 0;
        margin-bottom: 2rem;
        text-align: center;
    }
    
    /* Updated mobile background styling */
    .hero-content::before {
        width: 100%;
        height: 100%;
        transform: translateX(0);
        opacity: 0.3;
    }
    
    .hero-content::after {
        width: 100%;
        background: rgba(0, 0, 0, 0.7);
    }
    
    .hero-video {
        flex: 0 0 100%;
        max-width: 100%;
        padding-left: 0;
    }
    
    .hero-title {
        font-size: 2rem;
    }

    .section-title h2 {
        font-size: 1.8rem;
    }
}

/* Form Messages */
#form-messages {
    padding: 10px;
    margin-bottom: 15px;
    border-radius: 5px;
    display: none;
}

#form-messages.error-message {
    background-color: rgba(255, 87, 87, 0.2);
    border: 1px solid #ff5757;
    color: #ff5757;
    display: block;
}

#form-messages.success-message {
    background-color: rgba(75, 181, 67, 0.2);
    border: 1px solid #4bb543;
    color: #4bb543;
    display: block;
}

.contact-form {
    position: relative;
}

.contact-form .fa-spinner {
    margin-left: 5px;
}

/* Improved Social Media Links */
.social-links {
    margin-top: 30px;
}

.social-links h3 {
    margin-bottom: 15px;
    font-size: 1.2rem;
    color: var(--primary-color);
}

.social-icons {
    display: flex;
    gap: 20px;
}

.social-icons a {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    width: 45px;
    height: 45px;
    background-color: var(--primary-color);
    border-radius: 50%;
    color: var(--white);
    font-size: 20px;
    transition: var(--transition);
    text-decoration: none;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

.social-icons a:hover {
    transform: translateY(-3px);
    box-shadow: 0 0 15px rgba(0, 184, 212, 0.6);
    background-color: var(--secondary-color);
}

/* X Logo */
.x-logo {
    font-family: 'Arial', sans-serif;
    font-weight: bold;
    font-size: 24px;
    line-height: 1;
}
