/* NICHIIN Consultancy – Modern Design System
   Glassmorphism, Premium Gradients, and Dynamic Animations */

:root {
    --header-height: 72px;
    --color-bg: #0f172a;
    --color-surface: rgba(255, 255, 255, 0.05);
    --color-surface-hover: rgba(255, 255, 255, 0.1);
    --color-text: #f8fafc;
    --color-text-muted: #94a3b8;
    --color-primary: #38bdf8;
    --color-secondary: #818cf8;
    --color-accent: #f43f5e;
    --color-glass-border: rgba(255, 255, 255, 0.1);
    --container-max: 1320px;
    --font-heading: 'Outfit', sans-serif;
    --font-body: 'DM Sans', sans-serif;
    --shadow-premium: 0 20px 50px rgba(0, 0, 0, 0.4);
    --gradient-primary: linear-gradient(135deg, #38bdf8 0%, #818cf8 100%);
    --gradient-surface: linear-gradient(135deg, rgba(255, 255, 255, 0.08) 0%, rgba(255, 255, 255, 0.03) 100%);
}

/* Light Mode Theme */
:root[data-theme="light"] {
    --color-bg: #fafbfc;
    --color-surface: rgba(0, 0, 0, 0.02);
    --color-surface-hover: rgba(0, 0, 0, 0.05);
    --color-text: #1a1d21;
    --color-text-muted: #5c6370;
    --color-primary: #0066cc;
    --color-secondary: #6366f1;
    --color-accent: #c41e3a;
    --color-glass-border: rgba(0, 0, 0, 0.08);
    --shadow-premium: 0 20px 50px rgba(0, 0, 0, 0.1);
    --gradient-primary: linear-gradient(135deg, #0066cc 0%, #6366f1 100%);
    --gradient-surface: linear-gradient(135deg, rgba(0, 0, 0, 0.02) 0%, rgba(0, 0, 0, 0.01) 100%);
}

body.public-page {
    background-color: var(--color-bg);
    color: var(--color-text);
    font-family: var(--font-body);
    overflow-x: hidden;
}

/* Glassmorphism Utility */
/* Glassmorphism Utility */
.glass {
    background: var(--color-surface);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--color-glass-border);
    border-radius: 20px;
    box-shadow: var(--shadow-premium);
    padding: 5rem 4rem !important;
    /* Overriding for ultimate breathing room */
    transition: all 0.3s ease;
}

@media (max-width: 1200px) {
    .glass {
        padding: 4rem 3rem !important;
    }
}

@media (max-width: 992px) {
    .glass {
        padding: 3rem 2.5rem !important;
    }
}

@media (max-width: 768px) {
    .glass {
        padding: 2.5rem 2rem !important;
    }
}

@media (max-width: 480px) {
    .glass {
        padding: 2rem 1.5rem !important;
    }
}

/* Container & Spacing Normalization */
.container {
    width: 100%;
    max-width: var(--container-max);
    margin-right: auto;
    margin-left: auto;
    padding-right: 4rem;
    padding-left: 4rem;
}

@media (max-width: 1200px) {
    .container {
        padding-right: 2.5rem;
        padding-left: 2.5rem;
    }
}

@media (max-width: 768px) {
    .container {
        padding-right: 1.5rem;
        padding-left: 1.5rem;
    }
}

.public-main {
    padding-top: 0 !important;
    /* We handle top padding in hero/sections */
}

/* Premium Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-fade {
    animation: fadeIn 0.8s ease-out forwards;
}

/* Header Tweaks */
.site-header {
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--color-glass-border);
    transition: background-color 0.3s ease, border-color 0.3s ease;
}

:root[data-theme="light"] .site-header {
    background: rgba(255, 255, 255, 0.95);
}

.header-inner {
    padding-left: 0 !important;
    padding-right: 0 !important;
}

.brand-name {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    display: inline-block;
}

.hero .brand-name {
    background: linear-gradient(135deg, #38bdf8 0%, #a78bfa 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

:root[data-theme="light"] .hero .brand-name {
    background: linear-gradient(135deg, #38bdf8 0%, #818cf8 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.main-nav .nav-link {
    color: var(--color-text-muted);
    transition: all 0.2s ease;
}

.main-nav .nav-link:hover,
.main-nav .nav-link.active {
    color: var(--color-primary);
    background: var(--color-surface-hover);
}


/* Hero Section Enhancement */
.hero {
    position: relative;
    background: radial-gradient(circle at top right, rgba(56, 189, 248, 0.1), transparent),
        radial-gradient(circle at bottom left, rgba(129, 140, 248, 0.1), transparent),
        linear-gradient(180deg, #0f172a 0%, #1a2332 100%);
    padding: calc(var(--header-height) + 6rem) 0 6rem;
    min-height: 85vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

:root[data-theme="light"] .hero {
    background: radial-gradient(circle at top right, rgba(0, 102, 204, 0.2), transparent),
        radial-gradient(circle at bottom left, rgba(99, 102, 241, 0.2), transparent),
        linear-gradient(180deg, #1e3a8a 0%, #2c5aa0 50%, #1e3a8a 100%);
}

@media (max-width: 768px) {
    .hero {
        padding: calc(var(--header-height) + 4rem) 0 4rem;
        min-height: auto;
    }
}

.hero h1 {
    font-size: clamp(2.2rem, 8vw, 4.5rem);
    letter-spacing: -0.03em;
    line-height: 1.1;
    margin-bottom: 2rem;
    color: white;
}

.hero p {
    font-size: 1.25rem;
    color: rgba(255, 255, 255, 0.85);
    max-width: 900px;
    /* Increased for better visual balance */
}

.hero-badge {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.85rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    display: inline-block;
    margin-bottom: 1rem;
}

.hero .btn {
    padding: 1rem 2.5rem;
    border-radius: 50px;
    background: var(--gradient-primary);
    border: none;
    font-weight: 700;
    color: white;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.hero .btn:hover {
    transform: scale(1.05);
    box-shadow: 0 0 30px rgba(56, 189, 248, 0.4);
    color: white;
}

/* Light mode button text colors */
:root[data-theme="light"] .hero .btn {
    color: white;
}

:root[data-theme="light"] .hero .btn:hover {
    color: white;
}

.hero .btn-outline {
    background: transparent;
    border: 2px solid rgba(255, 255, 255, 0.3);
    color: white;
}

.hero .btn-outline:hover {
    background: rgba(56, 189, 248, 0.15);
    border-color: var(--color-primary);
    color: white;
}

:root[data-theme="light"] .hero .btn-outline {
    border-color: rgba(0, 0, 0, 0.2);
    color: white;
}

:root[data-theme="light"] .hero .btn-outline:hover {
    background: rgba(0, 102, 204, 0.1);
    border-color: var(--color-primary);
    color: white;
}

/* Apply Now Sticker */
.apply-now-sticker {
    position: absolute;
    top: 15%;
    left: 8%;
    z-index: 10;
    width: 140px;
    height: 140px;
    /* background: var(--gradient-primary); */
    /* background: var(--color-accent); */
    background: #fcfc68;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    /* color: white !important; */
    color: #ac1111 !important;
    font-weight: 800;
    font-size: 1.25rem;
    line-height: 1.1;
    text-decoration: none !important;
    box-shadow: 0 15px 35px rgba(56, 189, 248, 0.4);
    transform: rotate(-15deg);
    transition: all 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    cursor: pointer;
    border: 4px solid rgba(255, 255, 255, 0.3);
    animation: floatingSticker 4s ease-in-out infinite;
}

.apply-now-sticker span {
    display: block;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.apply-now-sticker::after {
    content: '';
    position: absolute;
    inset: -10px;
    border-radius: 50%;
    border: 2px solid var(--color-primary);
    opacity: 0.5;
    animation: stickerPulse 2s cubic-bezier(0.455, 0.03, 0.515, 0.955) infinite;
}

.apply-now-sticker:hover {
    transform: rotate(0deg) scale(1.15);
    box-shadow: 0 20px 50px rgba(56, 189, 248, 0.6);
    background: linear-gradient(135deg, #e6f423 0%, #c4f739 100%);
    border-color: rgba(255, 255, 255, 0.5);
}

@keyframes floatingSticker {

    0%,
    100% {
        transform: rotate(-15deg) translateY(0);
    }

    50% {
        transform: rotate(-10deg) translateY(-20px);
    }
}

@keyframes stickerPulse {
    0% {
        transform: scale(0.8);
        opacity: 0.8;
    }

    100% {
        transform: scale(1.4);
        opacity: 0;
    }
}

/* Floating Icon Bottom Right */
.floating-icon-bottom {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    z-index: 99;
    width: 100px;
    height: 100px;
    background: linear-gradient(135deg, #fcfc68 0%, #e6f423 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    text-align: center !important;
    color: #0b27b1 !important;
    text-decoration: none !important;
    box-shadow: 0 15px 35px rgba(56, 189, 248, 0.4);
    /* transform: rotate(15deg); */
    transition: all 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    cursor: pointer;
    border: 4px solid rgba(255, 255, 255, 0.3);
    animation: floatingIconBottom 4s ease-in-out infinite;
}

.floating-icon-bottom::after {
    content: '';
    position: absolute;
    inset: -10px;
    border-radius: 50%;
    border: 2px solid var(--color-primary);
    opacity: 0.5;
    animation: stickerPulse 2s cubic-bezier(0.455, 0.03, 0.515, 0.955) infinite;
}

.floating-icon-bottom:hover {
    transform: rotate(0deg) scale(1.15);
    box-shadow: 0 20px 50px rgba(56, 189, 248, 0.6);
    background: linear-gradient(135deg, #f0ff00 0%, #e6f423 100%);
    border-color: rgba(255, 255, 255, 0.5);
}

@keyframes floatingIconBottom {
    0%,
    100% {
        transform: rotate(0deg) translateY(0);
    }

    50% {
        transform: rotate(0deg) translateY(-20px);
    }
}

@media (max-width: 1200px) {
    .apply-now-sticker {
        left: 5%;
        width: 120px;
        height: 120px;
        font-size: 1.1rem;
    }

    .floating-icon-bottom {
        width: 80px;
        height: 80px;
        bottom: 1.5rem;
        right: 1.5rem;
        font-size: 0.7rem;
    }
}

@media (max-width: 991px) {
    .apply-now-sticker {
        display: none;
        /* Hide on smaller tablets/mobile to avoid clutter */
    }

    .floating-icon-bottom {
        width: 70px;
        height: 70px;
        bottom: 1rem;
        right: 1rem;
        font-size: 0.7rem;
    }
}

/* Cards & Sections */
.section {
    padding: 4rem 0;
    overflow: hidden;
}

@media (max-width: 768px) {
    .section {
        padding: 4rem 0;
    }
}

.card {
    background: var(--gradient-surface);
    backdrop-filter: blur(12px);
    border: 1px solid var(--color-glass-border);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    padding: 3.5rem 2.5rem !important;
    border-radius: 20px;
}

.card .card-body {
    padding: 0 !important;
}

@media (max-width: 992px) {
    .card {
        padding: 2.5rem 2rem !important;
    }
}

@media (max-width: 768px) {
    .card {
        padding: 2rem 1.5rem !important;
    }
}

@media (max-width: 480px) {
    .card {
        padding: 1.5rem 1.25rem !important;
    }
}

.card:hover {
    transform: translateY(-10px) scale(1.02);
    border-color: var(--color-primary);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
}

:root[data-theme="light"] .card:hover {
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.1);
}

/* Custom Accent Bar */
.accent-bar {
    height: 6px;
    width: 100px;
    margin: 0 auto 2rem;
    background: var(--gradient-primary);
    border-radius: 10px;
}

/* Footer Modernization */
.site-footer {
    background: #020617;
    border-top: 1px solid var(--color-glass-border);
    padding-left: 0 !important;
    padding-right: 0 !important;
    transition: background-color 0.3s ease, border-color 0.3s ease, color 0.3s ease;
}

:root[data-theme="light"] .site-footer {
    background: #f5f7fa;
    color: var(--color-text);
}

:root[data-theme="light"] .site-footer a {
    color: var(--color-primary);
}

:root[data-theme="light"] .site-footer a:hover {
    color: var(--color-accent);
}

.footer-bottom {
    border-top: 1px solid var(--color-glass-border);
}

:root[data-theme="light"] .footer-bottom {
    border-top-color: var(--color-glass-border);
}

/* Floating Elements */
.floating-blob {
    position: absolute;
    width: 300px;
    height: 300px;
    background: var(--color-primary);
    filter: blur(150px);
    opacity: 0.2;
    z-index: -1;
    border-radius: 50%;
}

.blob-1 {
    top: 10%;
    right: 10%;
}

.blob-2 {
    bottom: 10%;
    left: 10%;
}

.overflow-hidden {
    overflow: hidden;
}

.lg-btn {
    padding: 1.25rem 3rem;
    font-size: 1.1rem;
}

.font-lg {
    font-size: 1.25rem;
}

/* Button Group wrapping on mobile */
@media (max-width: 768px) {

    .hero .d-flex,
    .section .d-flex {
        flex-wrap: wrap;
    }
}


@media (max-width: 576px) {
    .lg-btn {
        padding: 0.8rem 1.5rem;
        font-size: 1rem;
        width: 100%;
        text-align: center;
        margin-bottom: 0.5rem;
    }

    .d-flex.gap-3 {
        gap: 0.5rem !important;
    }

    .glass.p-5 {
        padding: 1.5rem !important;
        /* More breathing room on smallest screens */
    }

    .display-3 {
        font-size: 2.5rem !important;
    }
}

/* Typography & Sections */
.section {
    position: relative;
    z-index: 1;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-heading);
    color: var(--color-text);
    margin-bottom: 1.25rem;
}

p {
    color: var(--color-text-muted);
    margin-bottom: 1.25rem;
}

.page-intro,
.lead {
    max-width: 850px !important;
    /* Allow more width to prevent narrow text blocks */
    margin-left: auto !important;
    margin-right: auto !important;
}

.text-primary {
    color: var(--color-primary) !important;
}

.text-white {
    color: white !important;
}

:root[data-theme="light"] .text-white {
    color: white !important;
}

.hero .text-white {
    color: white !important;
}

:root[data-theme="light"] .hero .text-white {
    color: white !important;
}

.hero .lead {
    color: rgba(255, 255, 255, 0.85) !important;
}

:root[data-theme="light"] .hero .lead {
    color: rgba(255, 255, 255, 0.85) !important;
}

.hero .display-3 {
    color: white !important;
}

:root[data-theme="light"] .hero .display-3 {
    color: white !important;
}

.hero h4 {
    color: white !important;
}

:root[data-theme="light"] .hero h4 {
    color: white !important;
}

.hero .hero-badge {
    color: rgba(255, 255, 255, 0.7) !important;
    font-weight: 900;
}

:root[data-theme="light"] .hero .hero-badge {
    color: rgba(255, 255, 255, 0.7) !important;
    font-weight: 900;
}

.display-3 {
    color: var(--color-text);
}

:root[data-theme="light"] .display-3 {
    color: var(--color-text);
}

.lead {
    color: var(--color-text-muted);
}

:root[data-theme="light"] .lead {
    color: var(--color-text-muted);
}

/* Page Title & Intro */
.page-title {
    color: var(--color-text);
    font-family: var(--font-heading);
    font-weight: 700;
}

.page-intro {
    color: var(--color-text-muted);
    font-size: 1.1rem;
}

:root[data-theme="light"] .page-title {
    color: var(--color-text);
}

:root[data-theme="light"] .page-intro {
    color: var(--color-text-muted);
}

/* Icon Colors */
i.text-primary {
    color: var(--color-primary) !important;
    transition: color 0.3s ease;
}

:root[data-theme="light"] i.text-primary {
    color: var(--color-primary) !important;
}

/* Card titles – ensure visible on dark cards */
.card-title {
    color: var(--color-text) !important;
}

.card-title a {
    color: inherit !important;
}

.card-title a:hover {
    color: var(--color-primary) !important;
}

/* Better responsive navbar */
@media (max-width: 900px) {
    .main-nav {
        background: rgba(15, 23, 42, 0.98) !important;
        backdrop-filter: blur(20px);
        transition: background-color 0.3s ease;
    }

    :root[data-theme="light"] .main-nav {
        background: rgba(250, 251, 252, 0.98) !important;
    }

    .main-nav .btn {
        margin-left: 0 !important;
        margin-top: 1rem;
        width: 100%;
        text-align: center;
        padding: 0.8rem !important;
    }

    .main-nav .nav-link {
        padding: 1rem !important;
        border-bottom: 1px solid var(--color-glass-border);
    }
}

/* Theme Toggle Button */
.theme-toggle-btn {
    background: none;
    border: none;
    color: var(--color-text-muted);
    font-size: 1.1rem;
    cursor: pointer;
    padding: 0.5rem 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    transition: all 0.3s ease;
    width: auto;
    height: auto;
}

.theme-toggle-btn:hover {
    color: var(--color-primary);
    background: rgba(56, 189, 248, 0.1);
}

.theme-toggle-btn.light-mode {
    color: var(--color-primary);
}

:root[data-theme="light"] .theme-toggle-btn {
    color: var(--color-text-muted);
}

:root[data-theme="light"] .theme-toggle-btn:hover {
    color: var(--color-primary);
    background: rgba(0, 102, 204, 0.08);
}

/* Light Mode Button Styles */
.btn-primary {
    background: var(--gradient-primary);
    color: white;
    border: none;
    transition: all 0.3s ease;
}

.btn-primary:hover {
    opacity: 0.9;
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(56, 189, 248, 0.3);
}

:root[data-theme="light"] .btn-primary {
    background: var(--gradient-primary);
    box-shadow: 0 4px 15px rgba(0, 102, 204, 0.2);
    color: #fff !important;
}

:root[data-theme="light"] .btn-primary:hover {
    box-shadow: 0 8px 25px rgba(0, 102, 204, 0.3);
}

/* Light Mode Form Styles */
.form-control {
    background: var(--color-surface);
    color: var(--color-text);
    border: 1px solid var(--color-glass-border);
    transition: all 0.3s ease;
}

.form-control:focus {
    background: var(--color-surface);
    color: var(--color-text);
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.1);
}

:root[data-theme="light"] .form-control:focus {
    box-shadow: 0 0 0 3px rgba(0, 102, 204, 0.1);
}

/* Light Mode Text Colors */
:root[data-theme="light"] h1,
:root[data-theme="light"] h2,
:root[data-theme="light"] h3,
:root[data-theme="light"] h4,
:root[data-theme="light"] h5,
:root[data-theme="light"] h6 {
    color: var(--color-text);
}

:root[data-theme="light"] p {
    color: var(--color-text-muted);
}

/* Light Mode Links */
a {
    color: var(--color-primary);
    transition: color 0.3s ease;
}

a:hover {
    color: var(--color-secondary);
}

:root[data-theme="light"] a {
    color: var(--color-primary);
}

:root[data-theme="light"] a:hover {
    color: var(--color-accent);
}

/* Light Mode Badges & Labels */
.badge {
    background: var(--color-primary);
    color: white;
}

:root[data-theme="light"] .badge {
    background: var(--color-primary);
    color: white;
}

/* Alerts - Theme Aware */
.alert {
    padding: 1.25rem 1.5rem;
    border-radius: 12px;
    border: 1px solid transparent;
    margin-bottom: 1.5rem;
    font-weight: 500;
}

/* Dark Mode Alerts (Default) */
.alert-success {
    background: rgba(16, 185, 129, 0.1);
    border-color: rgba(16, 185, 129, 0.2);
    color: #34d399;
}

.alert-danger {
    background: rgba(244, 63, 94, 0.1);
    border-color: rgba(244, 63, 94, 0.2);
    color: #fb7185;
}

/* Light Mode Alerts - High Contrast Bold */
:root[data-theme="light"] .alert-success {
    background: #4ade80;
    /* Bold Green */
    border-color: #064e3b;
    /* Dark Green Border */
    color: #064e3b;
    /* Deep Dark Text */
    box-shadow: 0 4px 12px rgba(6, 78, 59, 0.15);
}

:root[data-theme="light"] .alert-danger {
    background: #fb7185;
    /* Bold Rose/Red */
    border-color: #4c0519;
    /* Dark Red Border */
    color: #4c0519;
    /* Deep Dark Text */
    box-shadow: 0 4px 12px rgba(76, 5, 25, 0.15);
}

/* Light Mode Floating Blobs */
:root[data-theme="light"] .floating-blob {
    background: var(--color-primary);
    filter: blur(150px);
    opacity: 0.08;
}

/* Light Mode Section Dividers */
.divider {
    border-color: var(--color-glass-border);
}

:root[data-theme="light"] .divider {
    border-color: var(--color-glass-border);
}

/* Light Mode Utility Classes */
:root[data-theme="light"] .bg-dark {
    background-color: var(--color-bg) !important;
}

:root[data-theme="light"] .text-dark {
    color: var(--color-text) !important;
}

:root[data-theme="light"] .text-light {
    color: var(--color-text) !important;
}

:root[data-theme="light"] .border {
    border-color: var(--color-glass-border) !important;
}

/* Light Mode Dropdown & Menu */
.dropdown-menu {
    background: var(--color-surface);
    border: 1px solid var(--color-glass-border);
    color: var(--color-text);
}

.dropdown-item {
    color: var(--color-text);
}

.dropdown-item:hover,
.dropdown-item.active {
    background: var(--color-surface-hover);
    color: var(--color-primary);
}

:root[data-theme="light"] .dropdown-menu {
    background: rgba(255, 255, 255, 0.98);
    border: 1px solid var(--color-glass-border);
}

:root[data-theme="light"] .dropdown-item:hover,
:root[data-theme="light"] .dropdown-item.active {
    background: rgba(0, 102, 204, 0.08);
    color: var(--color-primary);
}

/* Ensure images don't overflow */
img {
    max-width: 100%;
    height: auto;
}