@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800&display=swap');

:root {
    --primary: #4f46e5;
    --primary-light: #818cf8;
    --primary-dark: #3730a3;
    --secondary: #0ea5e9;
    --accent: #f59e0b;
    --bg-main: #f8fafc;
    --bg-surface: #ffffff;
    --text-main: #0f172a;
    --text-muted: #64748b;
    --border-color: #e2e8f0;
    --success: #10b981;
    --error: #ef4444;
    
    --radius-sm: 0.375rem;
    --radius-md: 0.75rem;
    --radius-lg: 1.25rem;
    --radius-full: 9999px;
    
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Outfit', sans-serif;
    background-color: var(--bg-main);
    color: var(--text-main);
    line-height: 1.6;
    overflow-x: hidden;
}

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

ul {
    list-style: none;
}

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

/* Typography */
h1, h2, h3, h4, h5, h6 {
    line-height: 1.2;
    font-weight: 700;
    color: var(--text-main);
}

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

p {
    color: var(--text-muted);
    margin-bottom: 1rem;
}

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

.section {
    padding: 5rem 0;
}

/* Header */
.site-header {
    background-color: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 80px;
}

.logo-container {
    display: flex;
    align-items: center;
    gap: 1rem;
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--primary);
}

.logo-container img {
    height: 50px;
}

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

.nav-link {
    font-weight: 500;
    color: var(--text-main);
    position: relative;
    padding: 0.5rem 0;
}

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

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

.nav-dropdown {
    position: relative;
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background: var(--bg-surface);
    min-width: 200px;
    box-shadow: var(--shadow-lg);
    border-radius: var(--radius-md);
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: var(--transition);
    padding: 0.5rem 0;
}

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

.dropdown-item {
    display: block;
    padding: 0.75rem 1.5rem;
    color: var(--text-main);
    font-weight: 500;
}

.dropdown-item:hover {
    background-color: var(--bg-main);
    color: var(--primary);
}

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-main);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius-full);
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    border: none;
    gap: 0.5rem;
}

.btn-primary {
    background-color: var(--primary);
    color: white;
    box-shadow: var(--shadow-md);
}

.btn-primary:hover {
    background-color: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
    color: white;
}

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

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

/* Hero Section */
.hero {
    position: relative;
    padding: 8rem 0;
    overflow: hidden;
    background: linear-gradient(135deg, var(--bg-main) 0%, #e0e7ff 100%);
}

.hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.1;
    z-index: 0;
}

.hero-container {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.hero-content h1 {
    margin-bottom: 1.5rem;
    color: var(--text-main);
}

.hero-content h1 span {
    color: var(--primary);
}

.hero-content p {
    font-size: 1.25rem;
    margin-bottom: 2.5rem;
}

.hero-image-wrapper {
    position: relative;
}

.hero-image-wrapper img {
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    position: relative;
    z-index: 2;
}

.hero-shape {
    position: absolute;
    background: var(--secondary);
    width: 100%;
    height: 100%;
    border-radius: var(--radius-lg);
    top: 20px;
    left: 20px;
    z-index: 1;
    opacity: 0.2;
}

/* Cards */
.grid-3 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2rem;
}

.card {
    background: var(--bg-surface);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: var(--transition);
    border: 1px solid var(--border-color);
    height: 100%;
    display: flex;
    flex-direction: column;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-light);
}

.card-img-wrapper {
    position: relative;
    padding-top: 60%;
    overflow: hidden;
}

.card-img-wrapper img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

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

.card-body {
    padding: 2rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.card-title {
    font-size: 1.25rem;
    margin-bottom: 1rem;
}

.card-meta {
    font-size: 0.875rem;
    color: var(--primary);
    font-weight: 600;
    margin-bottom: 0.5rem;
}

/* Section Header */
.section-header {
    text-align: center;
    margin-bottom: 4rem;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.section-subtitle {
    color: var(--primary);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    font-size: 0.875rem;
    margin-bottom: 1rem;
    display: block;
}

/* Footer */
.site-footer {
    background-color: var(--text-main);
    color: white;
    padding: 5rem 0 2rem;
}

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

.footer-col h4 {
    color: white;
    margin-bottom: 1.5rem;
    font-size: 1.25rem;
}

.footer-col p {
    color: #94a3b8;
}

.footer-links li {
    margin-bottom: 0.75rem;
}

.footer-links a {
    color: #94a3b8;
}

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

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

.social-links a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: rgba(255,255,255,0.1);
    border-radius: 50%;
    color: white;
}

.social-links a:hover {
    background: var(--primary);
    transform: translateY(-3px);
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(255,255,255,0.1);
    color: #94a3b8;
}

/* Page Banner */
.page-banner {
    background-color: var(--primary-dark);
    padding: 6rem 0;
    text-align: center;
    color: white;
    position: relative;
}

.page-banner h1 {
    color: white;
}

/* Forms */
.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.form-control {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    font-family: inherit;
    font-size: 1rem;
    transition: var(--transition);
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

/* Responsive */
@media (max-width: 992px) {
    .hero-container {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .hero-content {
        order: 1;
    }
    
    .hero-image-wrapper {
        order: 2;
        max-width: 600px;
        margin: 0 auto;
    }
}

@media (max-width: 768px) {
    .main-nav {
        display: none;
        position: absolute;
        top: 80px;
        left: 0;
        width: 100%;
        background: var(--bg-surface);
        flex-direction: column;
        padding: 2rem;
        box-shadow: var(--shadow-md);
        gap: 1rem;
    }
    
    .main-nav.active {
        display: flex;
    }
    
    .mobile-menu-btn {
        display: block;
    }

    .dropdown-menu {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        box-shadow: none;
        padding-left: 1rem;
        display: none;
    }
    
    .nav-dropdown.active .dropdown-menu {
        display: block;
    }
}



/* =========================================
   KANAK VIDEO CARD - FINAL RESPONSIVE FIX
========================================= */

#video-feature.kanak-video-section {
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    padding: 50px 20px !important;
    background: #d3e5ff !important;
    box-sizing: border-box !important;
    overflow: hidden !important;
}

#video-feature .kanak-video-card {
    display: block !important;
    width: 100% !important;
    max-width: 1300px !important;
    margin: 0 auto !important;
    padding: 25px !important;
    background: #ffffff !important;
    border: 1px solid #e5e7eb !important;
    border-radius: 18px !important;
    box-shadow: 0 8px 30px rgba(0,0,0,0.12) !important;
    box-sizing: border-box !important;
}

#video-feature .kanak-video-title {
    display: flex !important;
    align-items: center !important;
    gap: 12px !important;
    width: 100% !important;
    margin: 0 0 22px !important;
    padding: 0 0 15px !important;
    border-bottom: 1px solid #eeeeee !important;
}

#video-feature .kanak-video-line {
    display: block !important;
    width: 5px !important;
    height: 28px !important;
    background: #e31b23 !important;
    border-radius: 5px !important;
    flex-shrink: 0 !important;
}

#video-feature .kanak-video-title h2 {
    margin: 0 !important;
    padding: 0 !important;
    font-size: 25px !important;
    font-weight: 700 !important;
    color: #172337 !important;
}

#video-feature .kanak-video-player {
    position: relative !important;
    display: block !important;
    width: 100% !important;
    aspect-ratio: 16 / 9 !important;
    height: auto !important;
    overflow: hidden !important;
    background: #000 !important;
    border-radius: 12px !important;
}

#video-feature .kanak-video-player iframe {
    position: absolute !important;
    inset: 0 !important;
    display: block !important;
    width: 100% !important;
    height: 100% !important;
    border: 0 !important;
}

/* TABLET */
@media (max-width: 768px) {
    #video-feature.kanak-video-section {
        width: 100% !important;
        padding: 30px 12px !important;
    }

    #video-feature .kanak-video-card {
        max-width: 100% !important;
        padding: 15px !important;
    }
}

/* MOBILE */
@media (max-width: 480px) {
    #video-feature.kanak-video-section {
        width: 100% !important;
        max-width: 100vw !important;
        padding: 20px 10px !important;
    }

    #video-feature .kanak-video-card {
        width: 100% !important;
        padding: 12px !important;
        border-radius: 12px !important;
    }

    #video-feature .kanak-video-title {
        gap: 9px !important;
        margin-bottom: 15px !important;
        padding-bottom: 12px !important;
    }

    #video-feature .kanak-video-title h2 {
        font-size: 20px !important;
    }

    #video-feature .kanak-video-player {
        width: 100% !important;
        aspect-ratio: 16 / 9 !important;
        border-radius: 8px !important;
    }
}








/* =========================================
   MOBILE NAVIGATION - FIXED
========================================= */

@media (max-width: 768px) {

    .site-header {
        position: sticky;
        top: 0;
        z-index: 9999;
    }

    .header-container {
        height: 70px;
        position: relative;
    }

    .mobile-menu-btn {
        display: flex !important;
        align-items: center;
        justify-content: center;
        width: 44px;
        height: 44px;
        font-size: 26px;
        cursor: pointer;
        z-index: 10001;
    }

    .main-nav {
        display: none !important;
        position: absolute;
        top: 70px;
        left: 0;
        right: 0;
        width: 100%;
        max-height: calc(100vh - 70px);
        overflow-y: auto;
        background: #ffffff;
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        padding: 15px 20px 25px;
        box-shadow: 0 10px 25px rgba(0,0,0,0.12);
        border-top: 1px solid #e2e8f0;
    }

    .main-nav.active {
        display: flex !important;
    }

    .nav-link {
        display: block;
        width: 100%;
        padding: 13px 10px;
        border-bottom: 1px solid #eeeeee;
    }

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

    .nav-dropdown {
        width: 100%;
    }

    .dropdown-menu {
        display: none;
        position: static;
        width: 100%;
        min-width: 100%;
        opacity: 1;
        visibility: visible;
        transform: none;
        box-shadow: none;
        border-radius: 0;
        padding: 5px 0 5px 15px;
        background: #f8fafc;
    }

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

    .dropdown-item {
        padding: 12px 15px;
        border-bottom: 1px solid #e2e8f0;
    }
}

@media (max-width: 480px) {

    .header-container {
        height: 65px;
    }

    .logo-container {
        gap: 8px;
        font-size: 1.2rem;
    }

    .logo-container img {
        height: 42px;
    }

    .main-nav {
        top: 65px;
        max-height: calc(100vh - 65px);
    }
}








/* =========================================
   FULL WEBSITE MOBILE RESPONSIVE FIX
========================================= */

@media (max-width: 768px) {

    html,
    body {
        width: 100% !important;
        max-width: 100% !important;
        margin: 0 !important;
        padding: 0 !important;
        overflow-x: hidden !important;
    }

    * {
        box-sizing: border-box;
    }

    img,
    video,
    iframe {
        max-width: 100%;
    }

    .container,
    .container-fluid {
        width: 100% !important;
        max-width: 100% !important;
    }

    .row {
        width: 100% !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
    }

    /* Hero Section */
    .hero,
    .hero-container {
        width: 100% !important;
        max-width: 100% !important;
    }

    .hero-container {
        grid-template-columns: 1fr !important;
        gap: 20px !important;
    }

    /* Video Section */
    #video-feature.kanak-video-section {
        width: 100% !important;
        max-width: 100% !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
        padding: 20px 10px !important;
        overflow: hidden !important;
    }

    #video-feature .kanak-video-card {
        width: 100% !important;
        max-width: 100% !important;
        margin: 0 auto !important;
    }

    #video-feature .kanak-video-player {
        width: 100% !important;
        aspect-ratio: 16 / 9 !important;
    }

    #video-feature .kanak-video-player iframe {
        width: 100% !important;
        height: 100% !important;
    }
}




/* ==========================================
   VIDYA FOUNDATION - UPDATED MOBILE WIDTH FIX
   Mobile: Full Screen Width
   Desktop: Original Design Unchanged
========================================== */

*,
*::before,
*::after {
    box-sizing: border-box;
}

html,
body {
    width: 100%;
    max-width: 100%;
    margin: 0;
}

@media screen and (max-width: 768px) {

    html,
    body {
        width: 100% !important;
        min-width: 0 !important;
        max-width: 100% !important;
        margin: 0 !important;
        padding: 0 !important;
        overflow-x: hidden !important;
    }

    body {
        display: block !important;
    }

    /* Main Content */
    main {
        display: block !important;
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
        margin: 0 !important;
        padding: 0 !important;
    }

    main > section {
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
    }

    /* Header */
    header[data-purpose="main-navigation"] {
        width: 100% !important;
        max-width: 100% !important;
        padding-left: 8px !important;
        padding-right: 8px !important;
    }

    header[data-purpose="main-navigation"] > div {
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
    }

    /* Common Tailwind Containers */
    main .max-w-7xl,
    header .max-w-7xl,
    footer .max-w-7xl {
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
        margin-left: auto !important;
        margin-right: auto !important;
    }

    /* Hero Section */
    #hero-carousel {
        display: flex !important;
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
    }

    #hero-carousel > div {
        max-width: 100% !important;
    }

    /* Welcome Section */
    #about {
        width: 100% !important;
        max-width: 100% !important;
    }

    #about > div {
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
    }

    /* Video Section */
    #video-feature,
    .kanak-video-section {
        display: block !important;
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
    }

    #video-feature iframe {
        width: 100% !important;
        max-width: 100% !important;
    }

    /* Footer */
    footer {
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
    }

    /* Images and Media */
    img,
    video,
    iframe,
    svg {
        max-width: 100%;
    }

    /* Prevent children from forcing narrow layouts */
    main *,
    footer * {
        min-width: 0;
    }
}

/* Small Mobile Screens */
@media screen and (max-width: 480px) {

    header[data-purpose="main-navigation"] {
        padding-left: 5px !important;
        padding-right: 5px !important;
    }

    #hero-carousel {
        min-height: 400px;
    }
}
