/* ===========================
   ALLIANCE OPERATIONS
   Main Stylesheet
   =========================== */

/* === PAGE LOADER === */
.page-loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

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

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

.loader-logo {
    width: 150px;
    height: auto;
    margin-bottom: 2rem;
    animation: pulse 2s ease-in-out infinite;
}

.loader-spinner {
    width: 50px;
    height: 50px;
    border: 3px solid rgba(70, 130, 180, 0.2);
    border-top-color: #4682B4;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto;
}

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

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.6; }
}

/* === CSS VARIABLES === */
:root {
    /* Colors - Black/White/Steel Blue Scheme */
    --color-primary: #4682B4; /* Steel Blue */
    --color-steel-blue: #4682B4;
    --color-steel-blue-accent: #5F9EA0;
    --color-steel-blue-dark: #2F4F6F;
    --color-black: #000000;
    --color-charcoal: #0a0a0a;
    --color-dark: #0a0a0a;
    --color-dark-brown: #2F4F6F; /* Reuse steel blue dark for compatibility */
    --color-white: #ffffff;
    --color-light-gray: #E8E8E8;
    --color-neutral: #333333;

    /* Typography - Tactical/Military-Inspired */
    --font-heading: 'Rajdhani', 'Exo 2', 'Montserrat', sans-serif;
    --font-body: 'Inter', sans-serif;
    --font-tactical: 'Roboto Mono', monospace;

    /* Spacing */
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 2rem;
    --spacing-lg: 4rem;
    --spacing-xl: 6rem;

    /* Transitions */
    --transition-fast: 0.2s ease;
    --transition-normal: 0.3s ease;
    --transition-slow: 0.5s ease;

    /* Shadows */
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.15);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.2);

    /* Border Radius */
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 16px;
}

/* === RESET & BASE === */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--font-body);
    color: var(--color-dark);
    line-height: 1.6;
    overflow-x: hidden;
    background: var(--color-white);
}

body > *:not(.page-loader) {
    animation: fadeInContent 0.8s ease-out;
}

@keyframes fadeInContent {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

img {
    max-width: 100%;
    display: block;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition-normal);
}

ul {
    list-style: none;
}

.hidden {
    display: none !important;
}

/* === CONTAINER === */
.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 2rem;
    width: 100%;
}

.container-fluid {
    max-width: 100%;
    padding: 0;
    width: 100%;
}

/* === TYPOGRAPHY === */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1rem;
}

h1 { font-size: clamp(2.5rem, 5vw, 4rem); }
h2 { font-size: clamp(2rem, 4vw, 3rem); }
h3 { font-size: clamp(1.5rem, 3vw, 2rem); }
h4 { font-size: clamp(1.25rem, 2.5vw, 1.5rem); }

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

.required {
    color: #d32f2f;
}

/* === HIGHLIGHTS === */
.highlight {
    color: var(--color-primary);
    font-weight: 800;
    text-shadow: 2px 2px 8px rgba(168, 159, 132, 0.4);
}

.highlight-accent {
    color: var(--color-primary);
    font-weight: 900;
    font-size: 1.15em;
    text-shadow: 0 0 20px rgba(168, 159, 132, 0.6);
    display: inline-block;
    position: relative;
}

.highlight-accent::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, var(--color-primary) 0%, var(--color-dark-brown) 100%);
    border-radius: 2px;
}

.highlight-text {
    color: var(--color-primary);
    font-weight: 700;
}

/* === VETERAN BADGE === */
.veteran-badge {
    display: inline-flex;
    align-items: center;
    background: linear-gradient(135deg, var(--color-steel-blue) 0%, var(--color-steel-blue-dark) 100%);
    padding: 0.5rem 1.2rem;
    border-radius: 4px;
    border: 2px solid var(--color-steel-blue-accent);
    margin-left: auto;
    margin-right: 1rem;
}

.veteran-badge-text {
    color: var(--color-white);
    font-family: var(--font-tactical);
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    white-space: nowrap;
}

/* === HEADER & NAVIGATION === */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    z-index: 1000;
    box-shadow: 0 2px 4px rgba(70, 130, 180, 0.3);
    border-bottom: 2px solid rgba(70, 130, 180, 0.5);
    transition: var(--transition-normal);
}

.main {
    padding-top: 0;
}

.nav {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    gap: 2rem;
    padding: 0.75rem 2rem;
    max-width: 1400px;
    margin: 0 auto;
    position: relative;
}

.nav-logo {
    color: var(--color-primary);
    font-size: 1.25rem;
    font-weight: 700;
    letter-spacing: 1px;
    font-family: var(--font-heading);
    display: flex;
    align-items: center;
}

.logo-img {
    height: 80px;
    width: auto;
    object-fit: contain;
    transition: var(--transition-normal);
}

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

.logo-text {
    /* Fallback text style */
    color: var(--color-primary);
    font-size: 1.25rem;
    font-weight: 700;
    letter-spacing: 1px;
    font-family: var(--font-heading);
}

.nav-menu {
    display: flex;
    flex: 1;
    justify-content: center;
}

.nav-list {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.nav-link {
    color: var(--color-white);
    font-weight: 600;
    font-size: 0.95rem;
    padding: 0.5rem 0;
    position: relative;
    display: flex;
    align-items: center;
    gap: 0.25rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--color-primary);
    transition: width var(--transition-normal);
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

.nav-link:hover {
    color: var(--color-steel-blue-accent);
}

.nav-cta {
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-dark-brown) 100%);
    color: var(--color-white);
    padding: 0.7rem 1.8rem;
    border-radius: 50px;
    font-weight: 700;
}

.nav-cta::after {
    display: none;
}

.nav-cta:hover {
    background: linear-gradient(135deg, var(--color-dark-brown) 0%, var(--color-dark) 100%);
    color: var(--color-white);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(168, 159, 132, 0.4);
}

/* Dropdown */
.dropdown {
    position: relative;
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background: var(--color-charcoal);
    min-width: 220px;
    padding: 0.5rem 0;
    border-radius: var(--radius-sm);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all var(--transition-normal);
    border: 2px solid var(--color-steel-blue);
}

.dropdown:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-menu li {
    padding: 0;
}

.dropdown-menu a {
    display: block;
    padding: 0.75rem 1.5rem;
    color: var(--color-white);
    font-size: 0.85rem;
    transition: var(--transition-fast);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.dropdown-menu a:hover {
    background: linear-gradient(90deg, var(--color-steel-blue) 0%, transparent 100%);
    color: var(--color-white);
    padding-left: 2rem;
}

/* Mobile Toggle */
.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
    z-index: 1001;
    padding: 10px;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 8px;
    border: 1px solid rgba(70, 130, 180, 0.3);
}

.nav-toggle span {
    width: 25px;
    height: 3px;
    background: var(--color-primary);
    border-radius: 2px;
    transition: var(--transition-normal);
}

/* === MAIN CONTENT === */
.main {
    margin-top: 0;
}

/* === SECTIONS === */
.section {
    padding: var(--spacing-xl) 0;
    background: var(--color-white);
    color: var(--color-dark);
}

.section-dark {
    background: var(--color-dark);
    color: var(--color-white);
}

.section-header {
    text-align: center;
    max-width: 850px;
    margin: 0 auto var(--spacing-lg);
}

.section-header .section-title {
    position: relative;
    display: inline-block;
    padding-bottom: 1rem;
}

.section-header .section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: linear-gradient(90deg, var(--color-primary) 0%, var(--color-dark-brown) 100%);
    border-radius: 2px;
}

.section-title {
    color: inherit;
    margin-bottom: var(--spacing-sm);
}

.section-subtitle {
    font-size: 1.1rem;
    color: inherit;
    opacity: 0.9;
}

.section-dark .section-title {
    color: var(--color-primary);
}

/* === HERO SECTION === */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    background: linear-gradient(135deg, var(--color-dark) 0%, var(--color-dark-brown) 100%);
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('../images/alliance-tactical-team.jpg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    opacity: 0.65;
    z-index: 1;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at center, transparent 0%, rgba(0, 0, 0, 0.6) 100%);
    z-index: 2;
}

.hero-content {
    position: relative;
    z-index: 10;
    max-width: 900px;
    padding: 2rem;
}

.hero-title {
    color: var(--color-white);
    margin-bottom: 1.5rem;
    text-shadow: 3px 3px 12px rgba(0, 0, 0, 0.5);
    animation: fadeInUp 1s ease-out;
    font-weight: 800;
    line-height: 1.1;
}

.hero-subtitle {
    font-size: 1.3rem;
    color: var(--color-white);
    margin-bottom: 2.5rem;
    max-width: 750px;
    margin-left: auto;
    margin-right: auto;
    opacity: 0.95;
    animation: fadeInUp 1s ease-out 0.2s both;
    text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.4);
    line-height: 1.6;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
    animation: fadeInUp 1s ease-out 0.4s both;
}

.hero-scroll {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    color: var(--color-primary);
    font-size: 1.5rem;
    animation: bounce 2s infinite;
    cursor: pointer;
}

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

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateX(-50%) translateY(0);
    }
    40% {
        transform: translateX(-50%) translateY(-10px);
    }
    60% {
        transform: translateX(-50%) translateY(-5px);
    }
}

/* === BUTTONS === */
.btn {
    display: inline-block;
    padding: 0.875rem 2rem;
    border-radius: 50px;
    font-weight: 700;
    font-size: 1rem;
    font-family: var(--font-heading);
    text-align: center;
    cursor: pointer;
    border: 2px solid transparent;
    transition: all var(--transition-normal);
    position: relative;
    overflow: hidden;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn:hover::before {
    width: 300px;
    height: 300px;
}

.btn-primary {
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-dark-brown) 100%);
    color: var(--color-white);
    box-shadow: 0 4px 15px rgba(168, 159, 132, 0.3);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(168, 159, 132, 0.5);
}

.btn-secondary {
    background: transparent;
    color: var(--color-white);
    border-color: var(--color-white);
    border-width: 2px;
}

.btn-secondary:hover {
    background: var(--color-white);
    color: var(--color-dark);
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(255, 255, 255, 0.3);
}

.btn-outline {
    background: transparent;
    border-color: var(--color-primary);
    color: var(--color-primary);
    border-width: 2px;
}

.btn-outline:hover {
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-dark-brown) 100%);
    color: var(--color-white);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(168, 159, 132, 0.4);
}

.btn-large {
    padding: 1.125rem 2.5rem;
    font-size: 1.1rem;
}

/* === PAGE HERO === */
.page-hero {
    background: linear-gradient(135deg, var(--color-dark) 0%, var(--color-dark-brown) 100%);
    color: var(--color-white);
    padding: 6rem 0 4rem;
    text-align: center;
}

.page-title {
    color: var(--color-primary);
    margin-bottom: 1rem;
}

.page-subtitle {
    font-size: 1.2rem;
    opacity: 0.9;
}

/* === FOOTER === */
.footer {
    background: var(--color-black);
    color: var(--color-white);
    padding: var(--spacing-lg) 0 var(--spacing-md);
    border-top: 2px solid var(--color-steel-blue);
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: var(--spacing-lg);
    margin-bottom: var(--spacing-lg);
}

.footer-logo {
    color: var(--color-steel-blue);
    font-size: 1.5rem;
    margin-bottom: 1rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.footer-title {
    color: var(--color-steel-blue);
    font-size: 1.1rem;
    margin-bottom: 1rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.footer-text {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.95rem;
}

.footer-links {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.9rem;
    transition: var(--transition-fast);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.footer-links a:hover {
    color: var(--color-steel-blue-accent);
    padding-left: 5px;
}

.footer-social {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

.social-link {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: linear-gradient(135deg, #0a0a0a 0%, #1a1a1a 100%);
    color: var(--color-steel-blue);
    border: 2px solid var(--color-steel-blue);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    position: relative;
    overflow: hidden;
}

.social-link i {
    position: relative;
    z-index: 2;
    color: inherit;
}

.social-link::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: radial-gradient(circle, rgba(70, 130, 180, 0.3) 0%, transparent 70%);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.6s ease, height 0.6s ease;
}

.social-link:hover::before {
    width: 200px;
    height: 200px;
}

.social-link:hover {
    background: linear-gradient(135deg, #4682B4 0%, #2F4F6F 100%);
    color: var(--color-white);
    transform: translateY(-5px) scale(1.15) rotate(5deg);
    border-color: var(--color-white);
    box-shadow: 0 10px 30px rgba(70, 130, 180, 0.6),
                0 0 20px rgba(70, 130, 180, 0.4),
                inset 0 0 20px rgba(255, 255, 255, 0.1);
}

.footer-bottom {
    text-align: center;
    padding-top: var(--spacing-md);
    border-top: 1px solid rgba(70, 130, 180, 0.3);
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.6);
}

.footer-credit {
    margin-top: 0.5rem;
    font-size: 0.85rem;
}

.sentinel-link {
    color: var(--color-steel-blue-accent);
    font-weight: 600;
    transition: var(--transition-fast);
}

.sentinel-link:hover {
    color: var(--color-steel-blue);
    text-decoration: underline;
}

/* === RESPONSIVE === */
@media (max-width: 1024px) {
    :root {
        --spacing-lg: 3rem;
        --spacing-xl: 4rem;
    }
}

@media (max-width: 768px) {
    /* Navigation */
    .nav-menu {
        position: fixed;
        top: 0;
        right: -100%;
        width: 80%;
        max-width: 350px;
        height: 100vh;
        background: #ffffff;
        padding: 5rem 2rem;
        transition: right var(--transition-normal);
        box-shadow: -4px 0 24px rgba(0, 0, 0, 0.3);
        z-index: 1000;
    }

    .nav-menu.active {
        right: 0;
    }

    .nav-list {
        flex-direction: column;
        align-items: flex-start;
        gap: 1.5rem;
    }

    .nav-link {
        color: var(--color-dark);
        font-size: 1.1rem;
    }

    .nav-link:hover {
        color: var(--color-primary);
    }

    .nav-toggle {
        display: flex;
        position: absolute;
        right: 2rem;
        top: 50%;
        transform: translateY(-50%);
    }

    .veteran-badge {
        display: none;
    }

    .dropdown-menu {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        box-shadow: none;
        background: #f5f5f5;
        border-radius: 8px;
        margin-top: 0.5rem;
        display: none;
    }

    .dropdown-menu a {
        color: var(--color-dark);
        font-size: 1rem;
    }

    .dropdown.active .dropdown-menu {
        display: block;
    }

    /* Hero */
    .hero {
        min-height: 70vh;
        padding-top: 120px;
    }

    .hero::before {
        background-attachment: scroll;
    }

    .page-hero {
        padding-top: 8.5rem;
    }

    .hero-buttons {
        flex-direction: column;
        align-items: stretch;
    }

    .btn {
        width: 100%;
    }

    /* Sections */
    :root {
        --spacing-md: 1.5rem;
        --spacing-lg: 2rem;
        --spacing-xl: 3rem;
    }

    .section {
        padding: var(--spacing-lg) 0;
    }

    .footer-content {
        grid-template-columns: 1fr;
        gap: var(--spacing-md);
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 1rem;
    }

    .nav {
        padding: 1rem;
    }

    html {
        font-size: 14px;
    }

    /* Enhanced touch targets for mobile */
    .nav-link, .btn, .social-link {
        min-height: 48px;
        min-width: 48px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }

    .nav-toggle {
        min-width: 48px;
        min-height: 48px;
    }

    /* Better mobile form inputs */
    input, textarea, select {
        font-size: 16px; /* Prevents zoom on iOS */
    }

    /* Improved mobile spacing */
    .hero-title {
        font-size: 1.8rem;
        line-height: 1.2;
        margin-bottom: 0.8rem;
    }

    .hero-subtitle {
        font-size: 0.85rem;
        margin-bottom: 1rem;
    }

    .hero-tagline {
        font-size: 0.7rem !important;
        margin-bottom: 1.5rem !important;
        letter-spacing: 1.5px !important;
    }

    .hero-content {
        padding: 1rem;
    }

    /* Mobile-optimized buttons */
    .btn {
        padding: 0.75rem 1.25rem;
        font-size: 0.85rem;
    }

    /* Better mobile cards */
    .service-card, .event-card {
        margin-bottom: 1rem;
    }
}

/* Performance optimizations */
* {
    -webkit-tap-highlight-color: rgba(70, 130, 180, 0.2);
}

/* Smooth scrolling for mobile */
@media (prefers-reduced-motion: no-preference) {
    html {
        scroll-behavior: smooth;
    }
}

/* Reduce animations on mobile for performance */
@media (max-width: 768px) {
    * {
        animation-duration: 0.3s !important;
        transition-duration: 0.2s !important;
    }
}
