/* =========================================================
   1. ROOT VARIABLES / BASE
   ========================================================= */
:root {
    --primary: #007bff;
    --bg-light: #ffffff;
    --text-light: #111;
    --bg-dark: #121212;
    --text-dark: #fff;
    --nav-bg-light: #f8f9fa;
    --nav-bg-dark: #1e1e1e;
}

html {
    scroll-behavior: smooth;
}

/* =========================================================
   2. TYPOGRAPHY & GLOBAL ELEMENTS
   ========================================================= */
body {
    font-family: Arial, sans-serif;
    line-height: 1.6;
    margin: 0;
    color: var(--text-light);
    background-color: var(--bg-light);
    transition: background-color 0.3s ease, color 0.3s ease;
}

h1,
h2,
h3,
h4 {
    margin: 0;
}

h2 {
    font-size: 2rem;
    margin-bottom: 20px;
    border-bottom: 2px solid var(--primary);
    padding-bottom: 10px;
}

h4 {
    font-size: 1.25rem;
    color: var(--primary);
    margin-top: 20px;
}

/* =========================================================
   3. NAVBAR / LOGO / NAV ITEMS
   ========================================================= */
nav[role="navigation"] {
    z-index: 1030;
}

.navbar .logo {
    height: clamp(60px, 5vw, 40px);
    width: auto;
    max-width: 100%;
    transition: transform 0.2s ease;
    background-repeat: no-repeat;
    background-size: contain;
    background-position: center;
}

.navbar .logo:hover {
    transform: scale(1.05);
}

.nav-link.active {
    font-weight: bold;
    color: var(--primary) !important;
    border-bottom: 2px solid var(--primary);
    transition: all .25s ease;
}

/* =========================================================
   4. HERO / HEADER
   ========================================================= */
header#home {
    background-image: url('home4.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: #fff;
    position: relative;
    overflow: hidden;
}

/* hero overlay */
header#home::before {
    content: "";
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    z-index: 0;
}

header#home .home-inner {
    position: relative;
    z-index: 1;
    padding: 80px 20px;
}

header#home h1 {
    font-size: 2.5rem;
    margin-bottom: .5rem;
    color: #fff;
}

header#home p.lead {
    color: #e9eef8;
    font-size: 1.15rem;
}

/* mobile hero fix */
@media (max-width: 768px) {
    header#home {
        background-attachment: scroll !important;
        height: auto;
        padding: 80px 0;
    }
}

@supports (-webkit-touch-callout: none) {
    header#home {
        background-attachment: scroll !important;
    }
}

/* =========================================================
   5. SECTIONS / ANIMATIONS
   ========================================================= */
section {
    padding: 60px 20px;
    max-width: 1200px;
    margin: 0 auto;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.9s ease-out, transform 0.9s ease-out;
    visibility: hidden;
    scroll-margin-top: 60px;
}

section.animate-visible {
    opacity: 1;
    transform: translateY(0);
    visibility: visible;
}

/* =========================================================
   6. LISTS
   ========================================================= */
ul.icon-list {
    list-style: none;
    padding-left: 0;
}

ul.icon-list li {
    list-style: none;
    margin-bottom: 10px;
}

ul.icon-list li::before {
    content: "✓";
    color: var(--primary);
    margin-right: 8px;
    font-weight: bold;
    position: relative;
    left: -6px;
}

/* =========================================================
   7. CONTACT FORM
   ========================================================= */
.error-message {
    color: #c82333;
    font-size: 13px;
    display: none;
}

.spinner {
    border: 4px solid #f3f3f3;
    border-top: 4px solid #28a745;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    animation: spin 1s linear infinite;
    display: inline-block;
    vertical-align: middle;
    margin-right: 8px;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

#statusMessage {
    color: #28a745;
    font-weight: 600;
    display: none;
    margin: 10px 0;
}

/* =========================================================
   8. THEME TOGGLE SWITCH
   ========================================================= */
.android-switch {
    position: relative;
    width: 50px;
    height: 28px;
    margin-left: 8px;
}

.android-switch input {
    display: none;
}

.android-switch label {
    display: block;
    width: 100%;
    height: 100%;
    background-color: #ccc;
    border-radius: 50px;
    cursor: pointer;
    transition: background-color .25s ease;
}

.android-switch label::after {
    content: "";
    position: absolute;
    top: 3px;
    left: 3px;
    width: 22px;
    height: 22px;
    background: #fff;
    border-radius: 50%;
    transition: transform .25s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.android-switch input:checked+label {
    background-color: #4caf50;
}

.android-switch input:checked+label::after {
    transform: translateX(22px);
}

/* =========================================================
   9. SCROLL TO TOP BUTTON
   ========================================================= */
#scrollTopBtn {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background-color: #3395ff;
    color: #fff;
    border: none;
    padding: 10px 12px;
    border-radius: 50%;
    font-size: 18px;
    cursor: pointer;
    box-shadow: 0 4px 8px rgba(0, 0, 0, .15);
    display: none;
    z-index: 2000;
}

#scrollTopBtn:focus {
    outline: 2px solid #fff;
    outline-offset: 2px;
}

/* =========================================================
   10. FOOTER
   ========================================================= */
footer {
    background: #1a1a1a;
    color: #fff;
    text-align: center;
    padding: 20px;
    transition: background-color .3s ease, color .3s ease;
}

body.light-theme footer {
    background: #f0f0f0;
    color: #111;
}

/* =========================================================
   11. SOCIAL ICONS
   ========================================================= */
.social-icons {
    margin-bottom: 15px;
    display: flex;
    justify-content: center;
    gap: 18px;
}

.social-icons a {
    display: inline-flex;
    text-decoration: none;
}

.social-icons .icon {
    width: 28px;
    height: 28px;
    fill: var(--text-light);
    transition: fill .25s ease, transform .25s ease;
}

.social-icons .icon:hover {
    transform: scale(1.15);
    fill: var(--primary);
}

/* Light theme icon color */
body.light-theme .social-icons .icon {
    fill: var(--text-light);
}

/* =========================================================
   12. LIGHT THEME
   ========================================================= */
body.light-theme {
    background-color: var(--bg-light);
    color: var(--text-light);
}

body.light-theme .navbar {
    background-color: var(--nav-bg-light) !important;
}

body.light-theme .nav-link {
    color: var(--text-light) !important;
}

/* =========================================================
   13. DARK THEME (Improved Professional Mode B)
   ========================================================= */
body.dark-theme {
    background-color: #121212;
    color: #eaeaea;
}

body.dark-theme .navbar {
    background-color: #1e1e1e !important;
}

body.dark-theme .navbar .nav-link {
    color: #eaeaea !important;
}

body.dark-theme .navbar .nav-link.active {
    color: #ffffff !important;
    border-bottom: 2px solid #007bff;
}

body.dark-theme section {
    background-color: #1a1a1a;
    color: #eaeaea;
    border-radius: 10px;
    border: 1px solid #2b2b2b;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.35);
}

body.dark-theme h1,
body.dark-theme h2,
body.dark-theme h3,
body.dark-theme h4 {
    color: #ffffff;
}

body.dark-theme header#home::before {
    background: rgba(0, 0, 0, 0.55);
}

body.dark-theme footer {
    background: #1e1e1e;
    color: #eaeaea;
    border-top: 1px solid #2b2b2b;
}

body.dark-theme .social-icons .icon {
    fill: #ffffff;
}

body.dark-theme .btn-primary {
    background-color: #007bff;
    border-color: #007bff;
}

body.dark-theme .btn-primary:hover {
    background-color: #006ae0;
    border-color: #006ae0;
}

body.dark-theme input,
body.dark-theme textarea {
    background-color: #1e1e1e;
    border: 1px solid #2d2d2d;
    color: #ffffff;
}

body.dark-theme input::placeholder,
body.dark-theme textarea::placeholder {
    color: #a7a7a7;
}

body.dark-theme input:focus,
body.dark-theme textarea:focus {
    border-color: #007bff;
    background-color: #252525;
    color: #ffffff;
}

body.dark-theme p {
    color: #d0cccc;
}

body.dark-theme #scrollTopBtn {
    background-color: #007bff;
    color: #ffffff;
}

body.dark-theme ul.icon-list li::before {
    color: #007bff;
}