* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

:root {
    --primary: #0f172a;
    --secondary: #0ea5e9;
    --accent: #42d73a;
    --hover: #ffffff;
    --light: #f9fbfa;
    --dark: #020617;
    --success: #16a34a;
    --text: #111827;
    --gray: #9ca3af;
}

body {
    line-height: 1.6;
    color: var(--text);
    background-color: #ffffff;
    overflow-x: hidden;
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
}

h1, h2, h3, h4 {
    margin-bottom: 20px;
    color: var(--primary);
    font-weight: 600;
}

h1 {
    font-size: 2.8rem;
}

h2 {
    font-size: 2.2rem;
    position: relative;
    padding-bottom: 15px;
}

h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, var(--secondary), var(--accent));
}

h3 {
    font-size: 1.6rem;
    color: var(--secondary);
}

p {
    margin-bottom: 20px;
    font-size: 1.05rem;
}

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

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

.btn {
    display: inline-block;
    padding: 12px 30px;
    background: linear-gradient(135deg, var(--secondary), var(--accent));
    color: white;
    border-radius: 999px;
    font-weight: 600;
    font-size: 0.95rem;
    border: none;
    cursor: pointer;
    box-shadow: 0 10px 20px rgba(15, 23, 42, 0.15);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 18px 30px rgba(15, 23, 42, 0.25);
}

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

.btn-outline:hover {
    background: var(--secondary);
    color: white;
}

/* Loader */
.loader {
    position: fixed;
    inset: 0;
    background-color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    transition: opacity 0.4s ease, visibility 0.4s ease;
}

.loader.hidden {
    opacity: 0;
    visibility: hidden;
}

.loader-content {
    text-align: center;
}

.loader-spinner {
    width: 56px;
    height: 56px;
    border-radius: 999px;
    border: 4px solid var(--light);
    border-top-color: var(--secondary);
    animation: spin 0.8s linear infinite;
    margin: 0 auto 16px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Dark mode toggle */
.dark-mode-toggle {
    position: fixed;
    top: 96px;
    right: 20px;
    width: 42px;
    height: 42px;
    border-radius: 999px;
    background: var(--dark);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 8px 20px rgba(15,23,42,0.4);
    z-index: 900;
    font-size: 1.1rem;
}

.dark-mode-toggle::before {
    content: "☾";
}

body.dark-mode .dark-mode-toggle::before {
    content: "☀";
}

/* Back-to-top */
.back-to-top {
    position: fixed;
    right: 24px;
    bottom: 30px;
    width: 46px;
    height: 46px;
    border-radius: 999px;
    background: var(--secondary);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.2s ease;
    z-index: 900;
    font-size: 1.4rem;
}

.back-to-top::before {
    content: "↑";
}

.back-to-top.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* Dark mode */
body.dark-mode {
    background-color: #020617;
    color: #e5e7eb;
}

body.dark-mode header {
    background: rgba(15,23,42,0.98);
    border-bottom-color: rgba(148,163,184,0.25);
}

body.dark-mode section {
    background-color: transparent;
}

body.dark-mode .service-card,
body.dark-mode .expertise-card,
body.dark-mode .training-card,
body.dark-mode .standard-card,
body.dark-mode .contact-form {
    background: #020617;
    border-color: rgba(148,163,184,0.3);
    box-shadow: 0 18px 45px rgba(15,23,42,0.7);
}

body.dark-mode h1,
body.dark-mode h2,
body.dark-mode h3,
body.dark-mode h4 {
    color: #f9fafb;
}

body.dark-mode p {
    color: #e5e7eb;
}

body.dark-mode .form-group input,
body.dark-mode .form-group textarea,
body.dark-mode .form-group select {
    background: #020617;
    border-color: rgba(148,163,184,0.5);
    color: #e5e7eb;
}

body.dark-mode footer {
    background: #020617;
}

/* Header */
header {
    position: fixed;
    inset-inline: 0;
    top: 0;
    background-color: rgba(255,255,255,0.96);
    border-bottom: 1px solid rgba(148,163,184,0.25);
    backdrop-filter: blur(12px);
    z-index: 800;
}

.header-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-block: 12px;
}

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

.logo h1 {
    margin: 0;
    font-size: 1.4rem;
}

.logo span {
    color: var(--accent);
}

.logo-img {
    height: 44px;
    width: auto;
    display: block;
}

.logo-img-dark {
    display: none;
}

body.dark-mode .logo-img-light {
    display: none;
}

body.dark-mode .logo-img-dark {
    display: block;
}

nav ul {
    display: flex;
    align-items: center;
    list-style: none;
    gap: 32px;
}

nav ul li a {
    position: relative;
    font-weight: 500;
    font-size: 1.05rem;
    padding: 10px 0;
    color: #949faf;
}

nav ul li a:hover{
    color: #2C5899; 
}

nav ul li a::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -6px;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--secondary), var(--accent));
    transition: width 0.2s ease;
}

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

.menu-toggle {
    display: none;
    width: 36px;
    height: 36px;
    border-radius: 999px;
    border: 1px solid rgba(148,163,184,0.8);
    position: relative;
    cursor: pointer;
}

.menu-toggle::before,
.menu-toggle::after {
    content: "";
    position: absolute;
    left: 9px;
    right: 9px;
    height: 2px;
    border-radius: 999px;
    background: #4b5563;
    transition: transform 0.2s ease, top 0.2s ease, bottom 0.2s ease;
}

.menu-toggle::before {
    top: 12px;
}

.menu-toggle::after {
    bottom: 12px;
}

.menu-toggle.open::before {
    top: 17px;
    transform: rotate(45deg);
}

.menu-toggle.open::after {
    bottom: 17px;
    transform: rotate(-45deg);
}

/* Hero */
.hero {
    min-height: 100vh;
    padding-top: 88px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    background:
        radial-gradient(circle at top left, rgba(14,165,233,0.7) 0, transparent 55%),
        radial-gradient(circle at bottom right, rgba(34,197,94,0.6) 0, transparent 55%),
        url('../assets/img/hero.jpg') no-repeat center center / cover;
    color: white;
}

#particles-js {
    position: absolute;
    inset: 0;
    opacity: 0.7;
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 760px;
    text-align: center;
    padding: 0 16px;
}

.hero h1 {
    color: white;
    font-size: 3rem;
    letter-spacing: 0.03em;
    margin-bottom: 16px;
}

.hero p {
    color: rgba(226,232,240,0.95);
    font-size: 1.2rem;
}

.hero-buttons {
    margin-top: 28px;
    display: flex;
    justify-content: center;
    gap: 16px;
    flex-wrap: wrap;
}

/* Typing */
.typing-effect {
    display: inline-block;
    border-right: 3px solid rgba(248,250,252,0.8);
    white-space: nowrap;
    overflow: hidden;
    animation: typing 3.2s steps(40, end) 0.3s both, blink 0.8s step-end infinite;
    margin-bottom: 18px;
}

@keyframes typing {
    from { width: 0; }
    to { width: 100%; }
}

@keyframes blink {
    from, to { border-color: transparent; }
    50% { border-color: rgba(248,250,252,0.8); }
}

/* Sections */
section {
    padding: 96px 0;
}

.about {
    background: var(--light);
}

.about-content {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 1.2fr);
    gap: 48px;
    align-items: center;
}

.about-image img {
    width: 100%;
    border-radius: 24px;
    box-shadow: 0 24px 60px rgba(15,23,42,0.35);
    object-fit: cover;
    max-height: 420px;
}

.about-text h3 {
    margin-bottom: 12px;
}

/* Services */
.services {
    background: #ffffff;
}

.section-header {
    text-align: left;
}

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

.service-card {
    background: #ffffff;
    border-radius: 24px;
    padding: 28px 24px;
    border: 1px solid rgba(148,163,184,0.28);
    box-shadow: 0 18px 45px rgba(15,23,42,0.06);
    position: relative;
    overflow: hidden;
    transition:
        transform 0.22s ease,
        box-shadow 0.22s ease,
        border-color 0.22s ease,
        background 0.22s ease;
    transform-origin: center;
}

.service-card::before {
    content: "";
    position: absolute;
    inset: -1px;
    border-radius: inherit;
    background: radial-gradient(circle at top left, rgba(14,165,233,0.35), transparent 60%);
    opacity: 0;
    z-index: -1;
    transition: opacity 0.25s ease;
}

.service-card:hover {
    transform: translateY(-6px) scale(1.01);
    box-shadow: 0 28px 70px rgba(15,23,42,0.22);
    border-color: rgba(14,165,233,0.7);
    background: linear-gradient(145deg, rgba(255,255,255,0.98), rgba(239,246,255,0.98));
}

.service-card:hover::before {
    opacity: 1;
}

.service-card h3 {
    margin-bottom: 10px;
    color: var(--primary);
}

.service-card p {
    margin-bottom: 0;
    color: #4b5563;
}

.service-icon {
    width: 40px;
    height: 40px;
    border-radius: 999px;
    background: radial-gradient(circle at 30% 30%, var(--secondary), var(--accent));
    margin-bottom: 16px;
}

/* Expertise */
.expertise {
    background: var(--light);
}

.expertise-grid {
    margin-top: 40px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 18px;
}

.expertise-card {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    background: #ffffff;
    border-radius: 18px;
    padding: 14px 14px;
    border: 1px solid rgba(148,163,184,0.3);
    box-shadow: 0 10px 28px rgba(15,23,42,0.04);
    transition:
        transform 0.18s ease,
        box-shadow 0.18s ease,
        border-color 0.18s ease,
        background 0.18s ease;
}

.expertise-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 45px rgba(15,23,42,0.16);
    border-color: rgba(34,197,94,0.8);
    background: linear-gradient(135deg, #ffffff, #ecfdf5);
}

.check-icon {
    flex-shrink: 0;
    width: 20px;
    height: 20px;
    border-radius: 999px;
    border: 2px solid var(--accent);
    position: relative;
    margin-top: 4px;
}

.check-icon::before {
    content: "";
    position: absolute;
    inset: 3px 4px 5px 5px;
    border-right: 2px solid var(--accent);
    border-bottom: 2px solid var(--accent);
    transform: rotate(40deg);
}

/*training*/ 
.training {
    background: #ffffff;
}

.training-grid {
    margin-top: 40px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 24px;
}

.training-card {
    background: #ffffff;
    border-radius: 24px;
    padding: 24px 22px;
    border: 1px solid rgba(148,163,184,0.3);
    box-shadow: 0 16px 40px rgba(15,23,42,0.06);
    position: relative;
    overflow: hidden;
    transition:
        transform 0.22s ease,
        box-shadow 0.22s ease,
        border-color 0.22s ease,
        background 0.22s ease;
}

.training-card::before {
    content: "";
    position: absolute;
    inset: -1px;
    border-radius: inherit;
    background: radial-gradient(circle at top left, rgba(42, 243, 112, 0.35), transparent 60%);
    opacity: 0;
    z-index: -1;
    transition: opacity 0.25s ease;
}

.training-card:hover {
    transform: translateY(-6px) scale(1.01);
    box-shadow: 0 28px 70px rgba(15,23,42,0.22);
    border-color: rgba(14, 233, 69, 0.7);
    background: linear-gradient(145deg, rgba(255,255,255,0.98), rgba(239,246,255,0.98));
}

.training-card:hover::before {
    opacity: 1;
}

.training-card h3 {
    margin-bottom: 10px;
}

.training-card p {
    margin-bottom: 0;
    color: #4b5563;
}

/* Standards */
.standards {
    background: #ffffff;
}

.standards-grid {
    margin-top: 40px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 24px;
}

.standard-card {
    background: #ffffff;
    border-radius: 24px;
    padding: 24px 22px;
    border: 1px solid rgba(148,163,184,0.3);
    box-shadow: 0 16px 40px rgba(15,23,42,0.06);
    position: relative;
    overflow: hidden;
    transition:
        transform 0.22s ease,
        box-shadow 0.22s ease,
        border-color 0.22s ease,
        background 0.22s ease;
}

.standard-card::before {
    content: "";
    position: absolute;
    inset: -1px;
    border-radius: inherit;
    background: radial-gradient(circle at top left, rgba(14,165,233,0.35), transparent 60%);
    opacity: 0;
    z-index: -1;
    transition: opacity 0.25s ease;
}

.standard-card:hover {
    transform: translateY(-6px) scale(1.01);
    box-shadow: 0 28px 70px rgba(15,23,42,0.22);
    border-color: rgba(14,165,233,0.7);
    background: linear-gradient(145deg, rgba(255,255,255,0.98), rgba(239,246,255,0.98));
}

.standard-card:hover::before {
    opacity: 1;
}

.standard-card h3 {
    margin-bottom: 10px;
}

.standard-card p {
    margin-bottom: 0;
    color: #4b5563;
}

/* Contact */
.contact {
    background: var(--light);
}

.contact-content {
    margin-top: 40px;
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
    gap: 40px;
}

.contact-form {
    background: #ffffff;
    border-radius: 24px;
    padding: 26px 24px 30px;
    border: 1px solid rgba(148,163,184,0.28);
    box-shadow: 0 18px 45px rgba(15,23,42,0.06);
}

.form-group {
    margin-bottom: 18px;
}

.form-group label {
    display: block;
    margin-bottom: 6px;
    font-size: 0.9rem;
    font-weight: 600;
    color: #9199a7;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    border-radius: 12px;
    border: 1px solid rgba(148,163,184,0.8);
    padding: 11px 12px;
    font-size: 0.95rem;
    outline: none;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.form-group textarea {
    resize: vertical;
    min-height: 120px;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    border-color: var(--secondary);
    box-shadow: 0 0 0 2px rgba(14,165,233,0.25);
}

#contact-status {
    margin-top: 10px;
    font-size: 0.9rem;
}

.contact-info h3 {
    margin-bottom: 18px;
}

.info-item {
    display: flex;
    gap: 12px;
    margin-bottom: 18px;
}

.info-icon {
    width: 32px;
    height: 32px;
    border-radius: 999px;
    background: radial-gradient(circle at 30% 30%, var(--secondary), var(--accent));
    position: relative;
    flex-shrink: 0;
}

.info-icon::before {
    content: "";
    position: absolute;
    inset: 8px;
    border-radius: inherit;
    border: 1.5px solid rgba(255,255,255,0.9);
}

.social-links {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

.social-circle {
    width: 32px;
    height: 32px;
    border-radius: 999px;
    border: 1px solid rgba(148,163,184,0.7);
    background: #ffffff;
    box-shadow: 0 6px 15px rgba(15,23,42,0.08);
    transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}

.social-circle:hover {
    transform: translateY(-2px);
    border-color: var(--secondary);
    box-shadow: 0 10px 22px rgba(15,23,42,0.18);
}

/* Footer */
/* Light-mode footer (default) */
footer {
    background: #f9fafb;      /* light gray */
    color: #111827;           /* dark text */
    padding: 56px 0 20px;
}

.footer-column h3 {
    color: #0b111e;
}

.footer-column p {
    color: #4b5563;
}

.footer-column ul li a {
    color: #4b5563;
}

.footer-bottom {
    border-top: 1px solid rgba(148,163,184,0.35);
    color: #6b7280;
}

/* Dark-mode override */
body.dark-mode footer {
    background: #020617;
    color: #0d1015;
}

body.dark-mode .footer-column h3 {
    color: #e5e7eb;
}

body.dark-mode .footer-column p,
body.dark-mode .footer-column ul li a {
    color: #9ca3af;
}


.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 32px;
    margin-bottom: 26px;
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
    flex-wrap: wrap;          /* allow wrapping instead of squashing over next column */
    max-width: 260px;         /* keeps the logo block from stretching too wide */
}

.footer-logo .logo-img {
    height: 38px;
    width: auto;
    display: block;
    flex-shrink: 0;
}

.footer-logo h2 {
    margin: 0;
    line-height: 1.1;
    transform: translateY(2px);
    font-size: 1.25rem;
    white-space: normal;      /* <-- this is the key: allow line breaks */
}


.footer-logo span {
    color: var(--accent);
}

.footer-column h3 {
    margin-bottom: 14px;
    font-size: 1.05rem;
    color: #434e65;  /* dark navy / readable */
}

.footer-column p {
    margin-bottom: 12px;
    color: #9ca3af;
}

.footer-column ul {
    list-style: none;
}

.footer-column ul li {
    margin-bottom: 8px;
}

.footer-column ul li a {
    color: #9ca3af;
    font-size: 0.95rem;
}

.footer-column ul li a:hover {
    color: #e5e7eb;
}

.newsletter-form {
    display: flex;
    margin-top: 10px;
    background: rgba(15,23,42,0.8);
    border-radius: 999px;
    padding: 3px;
}

.newsletter-form input {
    flex: 1;
    border-radius: 999px;
    border: none;
    padding: 8px 12px;
    font-size: 0.9rem;
    outline: none;
    background: transparent;
    color: #e5e7eb;
}

.newsletter-form input::placeholder {
    color: #6b7280;
}

.newsletter-form button {
    border-radius: 999px;
    border: none;
    padding: 8px 16px;
    background: linear-gradient(135deg, var(--secondary), var(--accent));
    color: white;
    cursor: pointer;
    font-size: 0.9rem;
}

.footer-bottom {
    text-align: center;
    border-top: 1px solid rgba(148,163,184,0.35);
    padding-top: 16px;
    font-size: 0.85rem;
    color: #9ca3af;
}

/* Animations */
@keyframes float {
    0%, 100% { transform: translateY(0) translateX(0); }
    25% { transform: translateY(-18px) translateX(8px); }
    50% { transform: translateY(-8px) translateX(-8px); }
    75% { transform: translateY(14px) translateX(4px); }
}

/* Responsive */
@media (max-width: 920px) {
    .about-content {
        grid-template-columns: minmax(0, 1fr);
    }

    .contact-content {
        grid-template-columns: minmax(0, 1fr);
    }
}

@media (max-width: 768px) {
    nav ul {
        position: fixed;
        inset-inline: 0;
        top: 64px;
        background: rgba(255,255,255,0.98);
        border-bottom: 1px solid rgba(148,163,184,0.3);
        flex-direction: column;
        gap: 14px;
        padding: 16px 0 18px;
        transform: translateY(-120%);
        transition: transform 0.18s ease;
        z-index: 700;
    }

    body.dark-mode nav ul {
        background: #020617;
    }

    nav ul.active {
        transform: translateY(0);
    }

    .menu-toggle {
        display: block;
    }

    .hero {
        text-align: center;
        padding-top: 88px;
        background:
            radial-gradient(circle at top left, rgba(14,165,233,0.7) 0, transparent 55%),
            radial-gradient(circle at bottom right, rgba(34,197,94,0.6) 0, transparent 55%),
            url('../assets/img/hero-mobile.jpg') no-repeat center center / cover;
    }

    .hero h1 {
        font-size: 2.45rem;
    }

    .hero p {
        font-size: 1.05rem;
    }

    .hero-buttons {
        flex-direction: column;
    }
}

@media (max-width: 640px) {
    section {
        padding: 72px 0;
    }

    .header-container {
        padding-block: 10px;
    }

    .logo h1 {
        font-size: 1.2rem;
    }
}

/* --- Global logo switcher for light/dark mode --- */

/* Default = light mode: show light logo, hide dark logo */
.logo-img-light {
    display: inline-block;
}

.logo-img-dark {
    display: none !important;
}

/* Dark mode: hide light logo, show dark logo */
body.dark-mode .logo-img-light {
    display: none !important;
}

body.dark-mode .logo-img-dark {
    display: inline-block !important;
}
