/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* CSS Variables for Theming */
:root {
    --primary-color: #0a3d6a;
    --secondary-color: #ff6b00;
    --accent-color: #048a81;
    --success-color: #28a745;
    --warning-color: #ffc107;
    --danger-color: #dc3545;
    --info-color: #17a2b8;
}

/* Dark Mode (Default) Variables */
html {
    --bg-color: #121212;
    --card-bg-color: #1e1e1e;
    --text-color: #e0e0e0;
    --heading-color: #ffffff;
    --nav-bg-color: rgba(18, 18, 18, 0.95);
    --footer-bg-color: #0d0d0d;
    --footer-text-color: rgba(255, 255, 255, 0.85);
    --light-section-bg: #1a1a1a;
    --header-gradient-start: rgba(10, 61, 106, 0.9);
    --header-gradient-end: rgba(10, 84, 148, 0.9);
    --contact-gradient-start: var(--primary-color);
    --contact-gradient-end: #0a5494;
    /* Theme switch variables for dark mode */
    --slider-bg-color: #2a2a2a;
    --slider-border-color: #555;
    --slider-thumb-color: #f0f0f0;
    /* Smooth scrolling */
    scroll-behavior: smooth;
}

/* Light Mode Variable Overrides */
html[data-theme='light'] {
    --bg-color: #f8f9fa;
    --card-bg-color: #ffffff;
    --text-color: #212529;
    --heading-color: #0a3d6a;
    --nav-bg-color: rgba(255, 255, 255, 0.95);
    --footer-bg-color: #212529;
    --footer-text-color: rgba(255, 255, 255, 0.85);
    --light-section-bg: #f8f9fa;
    --header-gradient-start: rgba(10, 61, 106, 0.85);
    --header-gradient-end: rgba(10, 84, 148, 0.85);
    --contact-gradient-start: var(--primary-color);
    --contact-gradient-end: #0a5494;
    /* Theme switch variables for light mode */
    --slider-bg-color: #ccc;
    --slider-border-color: transparent;
    --slider-thumb-color: white;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--bg-color);
    overflow-x: hidden;
    transition: background-color 0.3s ease, color 0.3s ease;
}

a {
    text-decoration: none;
    color: var(--primary-color);
    transition: all 0.3s ease;
}

/* Improved focus states for accessibility */
a:focus,
button:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    line-height: 1.2;
    margin-bottom: 1rem;
    color: var(--heading-color);
}

h1 { font-size: 3.5rem; font-weight: 700; }
h2 { font-size: 2.5rem; }
h3 { font-size: 1.5rem; }
p { margin-bottom: 1rem; font-size: 1.1rem; }

/* Navigation */
nav {
    position: fixed;
    top: 0;
    width: 100%;
    background-color: var(--nav-bg-color);
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
    z-index: 100;
    transition: all 0.3s ease;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--primary-color);
    display: flex;
    align-items: center;
    flex: 1;
}

.logo i { 
    margin-right: 0.5rem; 
    color: var(--secondary-color); 
}

.nav-links {
    display: flex;
    list-style: none;
    justify-content: center;
    flex: 2;
    margin: 0 2rem;
}

.nav-links li { margin: 0 1rem; }

.nav-links a {
    font-weight: 500;
    color: var(--text-color);
    position: relative;
    padding-bottom: 0.5rem;
    transition: color 0.3s ease;
}

.nav-links a:hover,
.nav-links a:focus {
    color: var(--secondary-color);
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--secondary-color);
    transition: width 0.3s ease;
}

.nav-links a:hover::after,
.nav-links a:focus::after { width: 100%; }

/* Mobile Menu Toggle */
.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    color: var(--text-color);
    font-size: 1.5rem;
    transition: color 0.3s ease;
    position: relative;
    z-index: 1001;
}

.mobile-menu-toggle:hover,
.mobile-menu-toggle:focus {
    color: var(--secondary-color);
}

/* Theme Switch */
.theme-switch-wrapper {
    display: flex;
    align-items: center;
    justify-content: flex-end;
}

.theme-switch {
    position: relative;
    display: inline-block;
    width: 60px;
    height: 34px;
}

.theme-switch input { 
    opacity: 0; 
    width: 0; 
    height: 0; 
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: var(--slider-bg-color);
    transition: .4s;
    border: 1px solid var(--slider-border-color);
}

.slider:before {
    position: absolute;
    content: "";
    height: 26px;
    width: 26px;
    left: 4px;
    bottom: 4px;
    background-color: var(--slider-thumb-color);
    transition: .4s;
}

input:checked + .slider { 
    background-color: var(--secondary-color); 
    border-color: var(--secondary-color); 
}

input:focus + .slider { 
    box-shadow: 0 0 1px var(--secondary-color); 
}

input:checked + .slider:before { 
    transform: translateX(26px); 
}

.slider.round { border-radius: 34px; }
.slider.round:before { border-radius: 50%; }

/* Header */
header {
    color: #fff;
    padding: 150px 20px 80px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        linear-gradient(135deg, var(--header-gradient-start) 0%, var(--header-gradient-end) 100%),
        url('hero.png');
    background-size: cover;
    background-position: center;
    z-index: -1;
}

.header-content {
    max-width: 800px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* Hero Logo Container with background box */
.hero-logo-container {
    display: inline-block;
    position: relative;
    z-index: 1;
    padding: 20px;
    margin-bottom: 1.5rem;
    animation: fadeInUp 0.8s ease;
}

/* Create a semi-transparent dark box behind the logo */
.hero-logo-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    border-radius: 15px;
    z-index: -1;
}

/* Hero Logo styling */
.hero-logo {
    max-height: 180px;
    width: auto;
    max-width: 100%;
    display: block;
    position: relative;
    z-index: 2;
}

header h1 {
    color: #ffffff;
    margin-bottom: 1.5rem;
    animation: fadeInUp 0.8s ease;
}

header p {
    color: #ffffff;
    font-size: 1.4rem;
    margin-bottom: 2.5rem;
    opacity: 0.9;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
    animation: fadeInUp 0.8s ease 0.2s both;
}

/* Buttons with improved focus states */
.button {
    display: inline-block;
    background-color: var(--secondary-color);
    color: white;
    padding: 15px 35px;
    border-radius: 50px;
    font-weight: 600;
    font-size: 1.1rem;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(255, 107, 0, 0.3);
    animation: fadeInUp 0.8s ease 0.4s both;
}

.button:hover,
.button:focus {
    background-color: #e55a00;
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(255, 107, 0, 0.4);
}

.button-outline {
    background-color: transparent;
    border: 2px solid var(--secondary-color);
    color: var(--secondary-color);
    box-shadow: none;
}

.button-outline:hover,
.button-outline:focus {
    background-color: var(--secondary-color);
    color: white;
}

/* Sections */
section {
    padding: 80px 20px;
    max-width: 1200px;
    margin: 0 auto;
}

.section-title {
    text-align: center;
    margin-bottom: 3rem;
    position: relative;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -15px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background-color: var(--secondary-color);
    border-radius: 2px;
}

/* About Section */
#about {
    background-color: var(--light-section-bg);
    border-radius: 20px;
    margin: 40px auto;
    padding: 60px 40px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    text-align: center;
}

#about h2 { margin-bottom: 2rem; }
#about p { font-size: 1.2rem; max-width: 800px; margin: 0 auto; }

/* Features Grid with improved responsive breakpoints */
.features {
    display: grid;
    grid-template-columns: 1fr;
    gap: 30px;
    margin-top: 50px;
}

.feature {
    background-color: var(--card-bg-color);
    padding: 40px 30px;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    text-align: center;
}

.feature::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 5px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
}

.feature:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.1);
}

.feature-icon { 
    font-size: 3rem; 
    color: var(--secondary-color); 
    margin-bottom: 1.5rem; 
    transition: transform 0.3s ease;
}

.feature:hover .feature-icon {
    transform: scale(1.1);
}

.feature h3 { 
    margin-bottom: 1rem; 
    font-size: 1.4rem; 
    color: var(--heading-color); 
}

.feature p { 
    font-size: 1rem; 
    color: var(--text-color); 
}

/* Product Showcase Section */
#product {
    background-color: var(--light-section-bg);
    border-radius: 20px;
    margin: 40px auto;
    padding: 60px 40px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
}

.product-container {
    display: flex;
    align-items: center;
    gap: 40px;
    max-width: 1000px;
    margin: 0 auto;
}

.product-image { 
    flex: 1; 
    text-align: center; 
}

.product-image img { 
    max-width: 100%; 
    height: auto; 
    border-radius: 15px; 
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.product-image img:hover {
    transform: scale(1.05);
}

.product-info { flex: 1; }
.product-info h2 { margin-bottom: 1.5rem; }
.product-info p { font-size: 1.1rem; color: var(--text-color); }

/* Benefits Section */
#benefits {
    background-color: var(--light-section-bg);
    border-radius: 20px;
    padding: 60px 40px;
    margin: 40px auto;
}

/* Contact Section */
#contact {
    text-align: center;
    background: linear-gradient(135deg, var(--contact-gradient-start) 0%, var(--contact-gradient-end) 100%);
    color: white;
    border-radius: 20px;
    margin: 40px auto;
    padding: 60px 40px;
}

#contact h2 { color: white; }
#contact p {
    font-size: 1.2rem;
    max-width: 700px;
    margin: 0 auto 2.5rem;
    color: rgba(255, 255, 255, 0.9);
}

.cta { margin-top: 30px; }
.button.cta-button {
    background-color: white;
    color: var(--primary-color);
    font-size: 1.2rem;
    padding: 18px 40px;
}
.button.cta-button:hover { 
    background-color: var(--bg-color); 
    color: white;
}

/* Footer */
footer {
    background-color: var(--footer-bg-color);
    color: var(--footer-text-color);
    text-align: center;
    padding: 40px 20px;
    font-size: 1rem;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}

.footer-logo { 
    font-size: 1.5rem; 
    font-weight: 700; 
    color: white; 
    margin-bottom: 1rem; 
}

.footer-links { 
    display: flex; 
    list-style: none; 
    margin-bottom: 1rem; 
}

.footer-links li { margin: 0 1rem; }
.footer-links a { 
    color: var(--footer-text-color); 
    transition: color 0.3s ease; 
}

.footer-links a:hover,
.footer-links a:focus { 
    color: var(--secondary-color); 
}

.social-icons {
    display: flex;
    justify-content: center;
    margin-top: 1.5rem;
}

.social-icons a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    margin: 0 0.5rem;
    color: white;
    transition: all 0.3s ease;
}

.social-icons a:hover,
.social-icons a:focus {
    background-color: var(--secondary-color);
    transform: translateY(-3px);
}

.copyright { 
    margin-top: 2rem; 
    font-size: 0.9rem; 
    color: rgba(255, 255, 255, 0.5); 
}

/* Animations */
@keyframes fadeInUp {
    from { 
        opacity: 0; 
        transform: translateY(30px); 
    }
    to { 
        opacity: 1; 
        transform: translateY(0); 
    }
}

/* Responsive Design with improved breakpoints */
@media (min-width: 768px) {
    .features { 
        grid-template-columns: repeat(2, 1fr); 
    }
}

@media (min-width: 992px) {
    .features { 
        grid-template-columns: repeat(3, 1fr); 
    }
}

@media (min-width: 1100px) {
    .features { 
        grid-template-columns: repeat(4, 1fr); 
    }
}

@media (max-width: 992px) {
    h1 { font-size: 3rem; }
    h2 { font-size: 2.2rem; }
    
    /* Mobile Navigation Styles */
    .mobile-menu-toggle {
        display: block;
        position: absolute;
        right: 2rem;
        top: 50%;
        transform: translateY(-50%);
    }
    
    .nav-container {
        position: relative;
    }
    
    .nav-links {
        position: fixed;
        top: 70px;
        left: -100%;
        width: 100%;
        height: calc(100vh - 70px);
        background-color: var(--nav-bg-color);
        flex-direction: column;
        justify-content: flex-start;
        align-items: center;
        padding-top: 2rem;
        transition: left 0.3s ease;
        margin: 0;
        box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
        z-index: 1000;
    }
    
    .nav-links.active {
        left: 0;
    }
    
    .nav-links li {
        margin: 1rem 0;
        width: 100%;
        text-align: center;
    }
    
    .nav-links a {
        display: block;
        padding: 1rem;
        width: 100%;
        font-size: 1.2rem;
    }
    
    .theme-switch-wrapper {
        margin-top: 2rem;
        justify-content: center;
    }
}

@media (max-width: 768px) {
    h1 { font-size: 2.5rem; }
    h2 { font-size: 2rem; }
    header { padding: 120px 20px 60px; }
    section { padding: 60px 20px; }
    .product-container { 
        flex-direction: column; 
        text-align: center; 
        gap: 20px; /* Explicit gap for mobile */
    }
    
    /* Hide footer links on mobile */
    .footer-links {
        display: none;
    }
    
    /* Adjust footer layout for mobile without links */
    .footer-content {
        flex-direction: column;
        text-align: center;
        gap: 2rem;
    }
    
    /* Center social icons on mobile */
    .social-icons {
        margin-top: 1rem;
    }
    
    .hero-logo {
        max-height: 120px;
    }
    .hero-logo-container {
        padding: 15px;
    }
}

@media (max-width: 576px) {
    h1 { font-size: 2.2rem; }
    h2 { font-size: 1.8rem; }
    p { font-size: 1rem; }
    .button { 
        padding: 12px 25px; 
        font-size: 1rem; 
    }
    .hero-logo {
        max-height: 90px;
    }
    .hero-logo-container {
        padding: 10px;
    }
}