/* ==========================================================================
   Base styles and CSS variables
   ========================================================================== */

:root {
    /* Color variables - Light Mode */
    --navy: #113A6E;
    --cobalt: #2E5BFF;
    --aqua: #00B3D8;
    --teal: #41E17A;
    --dark: #1A1D26;
    --offwhite: #EAF0FF;
    
    /* Theme variables */
    --bg-primary: var(--offwhite);
    --bg-secondary: #FFFFFF;
    --bg-accent: #F5F8FF;
    --text-primary: var(--dark);
    --text-secondary: #4A4E57;
    --accent-color: var(--cobalt);
    --border-color: #E1E8FF;
    --shadow-color: rgba(46, 91, 255, 0.1);
}

/* Dark mode colors */
[data-theme="dark"] {
    --bg-primary: var(--dark);
    --bg-secondary: #232631;
    --bg-accent: #2C303D;
    --text-primary: var(--offwhite);
    --text-secondary: #ADB5BD;
    --border-color: #343A46;
    --shadow-color: rgba(0, 0, 0, 0.3);
}

/* Base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', sans-serif;
    line-height: 1.6;
    color: var(--text-primary);
    background-color: var(--bg-primary);
    transition: background-color 0.3s, color 0.3s;
}

img {
    max-width: 100%;
    height: auto;
}

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

a:hover {
    color: var(--navy);
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ==========================================================================
   Typography
   ========================================================================== */

h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    margin-bottom: 1rem;
    line-height: 1.2;
}

h1 {
    font-size: clamp(2rem, 5vw, 3.5rem);
    color: var(--accent-color);
}

h2 {
    font-size: clamp(1.5rem, 4vw, 2.5rem);
    position: relative;
    display: inline-block;
    margin-bottom: 2rem;
}

h2:after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 0;
    width: 80px;
    height: 4px;
    background: var(--accent-color);
}

h3 {
    font-size: clamp(1.2rem, 3vw, 1.8rem);
    color: var(--navy);
}

p {
    margin-bottom: 1rem;
    color: var(--text-secondary);
}

[data-theme="dark"] h3 {
    color: var(--aqua);
}

/* ==========================================================================
   Header & Navigation
   ========================================================================== */

header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background-color: var(--bg-secondary);
    box-shadow: 0 2px 10px var(--shadow-color);
    z-index: 1000;
    transition: background-color 0.3s;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
}

.logo {
    display: flex;
    align-items: center;
}

.logo img {
    height: 40px;
}

nav ul {
    display: flex;
    list-style: none;
}

nav ul li {
    margin-left: 2rem;
}

nav ul li a {
    color: var(--text-primary);
    font-weight: 500;
    position: relative;
}

nav ul li a:hover {
    color: var(--accent-color);
}

nav ul li a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -4px;
    left: 0;
    background-color: var(--accent-color);
    transition: width 0.3s;
}

nav ul li a:hover::after {
    width: 100%;
}

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
}

.mobile-menu-btn span {
    display: block;
    width: 25px;
    height: 3px;
    margin: 5px 0;
    background-color: var(--text-primary);
    transition: all 0.3s;
}

/* Dark Mode Toggle */
.theme-toggle {
    display: flex;
    align-items: center;
    margin-left: 2rem;
}

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

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

.slider {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: 0.4s;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 5px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 22px;
    width: 22px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: 0.4s;
    z-index: 2;
}

.light-icon, .dark-icon {
    font-size: 14px;
    z-index: 1;
}

.light-icon {
    margin-right: auto;
}

.dark-icon {
    margin-left: auto;
}

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

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

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

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

/* ==========================================================================
   Hero Section
   ========================================================================== */

.hero {
    padding: 8rem 0 5rem;
    background: linear-gradient(135deg, var(--navy) 0%, var(--cobalt) 100%);
    color: white;
    text-align: center;
}

.hero-content {
    max-width: 800px;
    margin: 0 auto;
}

.hero h1 {
    color: white;
    margin-bottom: 1.5rem;
}

.hero p {
    font-size: clamp(1.1rem, 2vw, 1.4rem);
    margin-bottom: 2.5rem;
    color: var(--offwhite);
}

.cta-button {
    display: inline-block;
    padding: 0.8rem 2rem;
    background-color: var(--teal);
    color: var(--dark) !important;
    font-weight: 600;
    border-radius: 50px;
    transition: transform 0.3s, box-shadow 0.3s;
}

.cta-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

/* ==========================================================================
   Services Section
   ========================================================================== */

.services {
    padding: 5rem 0;
    background-color: var(--bg-primary);
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.service-card {
    background-color: var(--bg-secondary);
    border-radius: 10px;
    padding: 2rem;
    box-shadow: 0 5px 15px var(--shadow-color);
    transition: transform 0.3s, box-shadow 0.3s;
}

.service-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px var(--shadow-color);
}

.service-icon {
    width: 70px;
    height: 70px;
    background: rgba(46, 91, 255, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
}

.service-icon img {
    width: 40px;
    height: 40px;
}

.service-icon svg {
    width: 40px;
    height: 40px;
    color: var(--cobalt);
}

[data-theme="dark"] .service-icon svg {
    color: var(--aqua);
}

/* ==========================================================================
   About Section
   ========================================================================== */

.about {
    padding: 5rem 0;
    background-color: var(--bg-accent);
}

.about-content {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
}

.about-text ul {
    list-style-position: inside;
    margin-bottom: 1.5rem;
}

.about-text li {
    margin-bottom: 0.5rem;
    color: var(--text-secondary);
}

/* ==========================================================================
   Contact Section
   ========================================================================== */

.contact {
    padding: 5rem 0;
    background-color: var(--bg-primary);
}

.contact-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 3rem;
}

.contact-info p {
    margin-bottom: 1rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--text-primary);
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 0.8rem;
    border: 1px solid var(--border-color);
    border-radius: 5px;
    background-color: var(--bg-secondary);
    color: var(--text-primary);
    font-family: 'Inter', sans-serif;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--accent-color);
}

.submit-btn {
    padding: 0.8rem 2rem;
    background-color: var(--accent-color);
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-weight: 600;
    transition: background-color 0.3s;
}

.submit-btn:hover {
    background-color: var(--navy);
}

.form-feedback {
    margin-bottom: 1rem;
    padding: 0.5rem 0;
    min-height: 1.5rem;
}

.form-feedback.success {
    color: var(--teal);
    font-weight: 500;
}

.form-feedback.error {
    color: #e74c3c;
    font-weight: 500;
}

/* ==========================================================================
   Footer
   ========================================================================== */

footer {
    padding: 2rem 0;
    background-color: var(--bg-secondary);
    text-align: center;
    border-top: 1px solid var(--border-color);
}

footer p {
    margin-bottom: 0;
}

/* ==========================================================================
   Responsive Styles
   ========================================================================== */

@media (max-width: 768px) {
    nav {
        display: none;
    }

    nav.active {
        display: block;
        position: absolute;
        top: 70px;
        left: 0;
        right: 0;
        background-color: var(--bg-secondary);
        box-shadow: 0 5px 10px var(--shadow-color);
        padding: 1rem;
    }

    nav.active ul {
        flex-direction: column;
    }

    nav.active ul li {
        margin: 1rem 0;
        text-align: center;
    }

    .mobile-menu-btn {
        display: block;
    }

    .mobile-menu-btn.active span:nth-child(1) {
        transform: rotate(45deg) translate(5px, 6px);
    }

    .mobile-menu-btn.active span:nth-child(2) {
        opacity: 0;
    }

    .mobile-menu-btn.active span:nth-child(3) {
        transform: rotate(-45deg) translate(5px, -6px);
    }

    .contact-content {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .hero {
        padding-top: 7rem;
    }

    .service-card {
        padding: 1.5rem;
    }

    .theme-toggle {
        margin-left: 1rem;
    }
}