/**
 * Core Stylesheet for National Political Party CMS
 * Implements Mobile-First design, Glassmorphism, and Premium UI components.
 */

/* =====================================================
   CSS VARIABLES & THEMING
===================================================== */
:root {
    /* Brand Colors - Patriotic & Professional */
    --primary-color: #003366; /* Deep National Blue */
    --secondary-color: #FF9933; /* Saffron/Orange */
    --success-color: #138808; /* Indian Green */
    --dark-color: #1a1a1a;
    --light-color: #f8f9fa;
    
    /* Gradients */
    --gradient-primary: linear-gradient(135deg, #003366 0%, #004c99 100%);
    --gradient-secondary: linear-gradient(135deg, #FF9933 0%, #ffb366 100%);
    
    /* Typography */
    --font-primary: 'Inter', sans-serif;
    --font-heading: 'Playfair Display', serif;
    
    /* Shadows & Transitions */
    --box-shadow-sm: 0 4px 6px rgba(0, 0, 0, 0.05);
    --box-shadow-lg: 0 15px 35px rgba(0, 0, 0, 0.1);
    --transition-speed: 0.3s;
}

/* =====================================================
   GLOBAL STYLES
===================================================== */
body {
    font-family: var(--font-primary);
    color: #333333;
    background-color: var(--light-color);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6, .navbar-brand {
    font-family: var(--font-heading);
}

.tracking-wide {
    letter-spacing: 1.5px;
}

/* Bootstrap Overrides */
.text-primary { color: var(--primary-color) !important; }
.bg-primary { background-color: var(--primary-color) !important; }
.border-primary { border-color: var(--primary-color) !important; }
.btn-primary {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}
.btn-primary:hover, .btn-primary:focus {
    background-color: #002244;
    border-color: #002244;
}

.text-secondary { color: var(--secondary-color) !important; }
.bg-secondary { background-color: var(--secondary-color) !important; }

/* =====================================================
   UTILITIES & EFFECTS
===================================================== */
.transition-hover {
    transition: all var(--transition-speed) ease-in-out;
}

.btn-gradient {
    background: var(--gradient-primary);
    border: none;
    color: #ffffff;
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.btn-gradient::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #004c99 0%, #003366 100%);
    z-index: -1;
    transition: opacity var(--transition-speed) ease;
    opacity: 0;
}

.btn-gradient:hover::before {
    opacity: 1;
}

.btn-gradient.btn-success {
    background: linear-gradient(135deg, #138808 0%, #1a9c0f 100%);
}

.btn-gradient.btn-success::before {
    background: linear-gradient(135deg, #1a9c0f 0%, #138808 100%);
}

/* =====================================================
   NAVIGATION & HEADER
===================================================== */
.top-bar {
    font-size: 0.875rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.top-bar a:hover {
    color: var(--secondary-color) !important;
}

/* Glassmorphism Navbar */
.glassmorphism-nav {
    background: rgba(255, 255, 255, 0.9) !important;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.3);
}

.navbar-nav .nav-link {
    color: #444;
    font-weight: 500;
    padding: 1rem 1.2rem !important;
    position: relative;
}

.navbar-nav .nav-link:hover, 
.navbar-nav .nav-link.active {
    color: var(--primary-color);
}

.navbar-nav .nav-link::after {
    content: '';
    position: absolute;
    bottom: 5px;
    left: 50%;
    width: 0;
    height: 2px;
    background-color: var(--secondary-color);
    transition: all var(--transition-speed) ease;
    transform: translateX(-50%);
}

.navbar-nav .nav-link:hover::after, 
.navbar-nav .nav-link.active::after {
    width: 70%;
}

/* Mega Menu */
@media all and (min-width: 992px) {
    .navbar .has-megamenu { position: static !important; }
    .navbar .megamenu { left: 0; right: 0; width: 100%; padding: 20px; border-radius: 0 0 10px 10px; }
    .navbar .dropdown-menu { border-radius: 0 0 10px 10px; border-top: 3px solid var(--primary-color); }
}

.dropdown-item:hover {
    background-color: rgba(0, 51, 102, 0.05);
    color: var(--primary-color);
    padding-left: 1.5rem;
}

/* =====================================================
   HERO CAROUSEL
===================================================== */
.hero-section {
    height: 80vh;
    min-height: 600px;
}

.hero-slide {
    height: 100%;
    width: 100%;
}

.swiper-pagination-bullet {
    background: #ffffff;
    opacity: 0.6;
}

.swiper-pagination-bullet-active {
    background: var(--secondary-color);
    opacity: 1;
}

.swiper-button-next, .swiper-button-prev {
    color: rgba(255, 255, 255, 0.7) !important;
    transition: color 0.3s ease;
}

.swiper-button-next:hover, .swiper-button-prev:hover {
    color: #ffffff !important;
}

/* =====================================================
   COMPONENTS (CARDS, CTA, COUNTERS)
===================================================== */
/* Premium Cards */
.premium-card {
    border-radius: 12px;
}

.premium-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--box-shadow-lg) !important;
}

.card-img-top {
    border-top-left-radius: 12px;
    border-top-right-radius: 12px;
    object-fit: cover;
    height: 200px;
}

/* CTA Blocks */
.cta-block:hover {
    filter: brightness(1.1);
    transform: scale(1.02);
    z-index: 2;
    position: relative;
    box-shadow: var(--box-shadow-lg);
}

/* Background Attachment */
.bg-attachment-fixed {
    background-attachment: fixed;
    background-size: cover;
    background-position: center;
}

/* =====================================================
   FOOTER
===================================================== */
footer {
    font-size: 0.9rem;
}

.footer-links a:hover {
    color: var(--secondary-color) !important;
    padding-left: 5px;
}

footer .btn-outline-secondary {
    border-color: rgba(255, 255, 255, 0.2);
    color: #adb5bd;
}

footer .btn-outline-secondary:hover {
    background-color: var(--secondary-color);
    border-color: var(--secondary-color);
    color: #ffffff;
}

/* =====================================================
   ACCESSIBILITY (WCAG)
===================================================== */
a:focus, button:focus, input:focus, select:focus, textarea:focus {
    outline: 2px dashed var(--secondary-color) !important;
    outline-offset: 2px;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}