/* Luanshya Institute of Agriculture and Engineering Innovations (LIAEI) */
/* Core Design System */

:root {
    scroll-behavior: smooth;
    --primary-green: #1B5E20; /* Deep Green */
    --secondary-gold: #FFC107; /* Gold */
    --gold-dark: #F9A825;
    --text-dark: #333333;
    --text-light: #666666;
    --white: #FFFFFF;
    --off-white: #F8F9FA;
    --transition: all 0.3s ease;
    --shadow: 0 4px 20px rgba(0,0,0,0.08);
}

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

html {
    scroll-behavior: smooth;
    width: 100%;
    overflow-x: hidden;
}

body {
    background-color: var(--off-white);
    color: var(--text-dark);
    line-height: 1.6;
    width: 100%;
    overflow-x: hidden;
    padding-top: 85px; /* Added to account for fixed header */
}

/* Scroll Progress Bar */
#scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    width: 0%;
    height: 4px;
    background: linear-gradient(to right, var(--primary-green), var(--secondary-gold));
    z-index: 2000;
}

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

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

/* Header & Navigation */
header {
    background: linear-gradient(to right, #ffffff, var(--primary-green));
    box-shadow: 0 2px 20px rgba(0,0,0,0.1);
    position: fixed;
    top: 0;
    left: 0;
    z-index: 1000;
    width: 100%;
}

.top-bar {
    background: var(--primary-green);
    color: var(--white);
    padding: 8px 5%;
    display: flex;
    justify-content: space-between;
    font-size: 0.85rem;
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 5%;
    position: relative;
}

.menu-toggle {
    display: none;
    font-size: 1.5rem;
    color: var(--white);
    cursor: pointer;
}


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

.logo img {
    height: 60px;
}

.logo-text {
    font-size: 1.3rem;
    font-weight: 800;
    color: var(--primary-green);
    line-height: 1.1;
    letter-spacing: -0.02em;
}

.logo-text span {
    color: #000000;
    display: block;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-top: 2px;
}

nav ul {
    display: flex;
    list-style: none;
    gap: 25px;
}

nav ul li a {
    font-weight: 600;
    color: var(--white);
    font-size: 0.95rem;
    position: relative;
}

nav ul li a:hover, nav ul li a.active {
    color: var(--secondary-gold);
}

nav ul li a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--secondary-gold);
    transition: var(--transition);
}

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

.btn-apply {
    background: var(--secondary-gold);
    color: var(--text-dark) !important;
    padding: 10px 20px;
    border-radius: 5px;
    font-weight: 700 !important;
}

.btn-apply:hover {
    background: var(--gold-dark);
    transform: translateY(-2px);
}

/* Hero and Section styles moved to pages/home.css */

/* Sections */
section {
    padding: 80px 10%;
}

.section-title {
    text-align: center;
    margin-bottom: 50px;
}

.section-title h2 {
    font-size: 2.8rem;
    position: relative;
    padding-bottom: 20px;
    display: inline-block;
    letter-spacing: -1px;
}

.section-title h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: var(--secondary-gold);
}

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

.card {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    padding: 30px;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
    text-align: center;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid rgba(255,255,255,0.4);
    position: relative;
    overflow: hidden;
}

.card:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: 0 25px 50px rgba(0,0,0,0.12);
    border-color: var(--primary-green);
    background: var(--white);
}

/* Entrance Animations */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s ease-out;
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

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

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.card-img {
    height: 200px;
    background-size: cover;
    background-position: center;
}

.card-content {
    padding: 25px;
}

.card-content h3 {
    margin-bottom: 15px;
}

/* Footer */
.video-footer {
    position: relative;
    background: #111;
    color: #ccc;
    padding: 60px 5% 20px;
    overflow: hidden;
}

.footer-video {
    position: absolute;
    top: 50%;
    left: 50%;
    min-width: 100%;
    min-height: 100%;
    width: auto;
    height: auto;
    transform: translateX(-50%) translateY(-50%);
    object-fit: cover;
    z-index: 1;
}

.footer-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(17, 17, 17, 0.85); /* Dark overlay for text readability */
    z-index: 2;
}

.footer-content {
    position: relative;
    z-index: 3;
}

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

.footer-col h4 {
    color: var(--white);
    margin-bottom: 25px;
}

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

.footer-col ul li {
    margin-bottom: 12px;
}

.footer-col ul li a:hover {
    color: var(--secondary-gold);
}

.footer-bottom {
    border-top: 1px solid #333;
    padding-top: 20px;
    text-align: center;
    font-size: 0.9rem;
}

.facebook-note {
    font-size: 0.8rem;
    font-style: italic;
    color: #888;
    margin-top: 10px;
}

/* Form styles moved to pages/forms.css (shared by apply, contact, check-status) */

/* Admin styles moved to pages/admin-login.css */

/* Mini Hero for Internal Pages */
.mini-hero {
    height: 30vh;
    min-height: 250px;
    background: linear-gradient(rgba(0,0,0,0.7), rgba(0,0,0,0.7)), url('../images/welding.jpg');
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: var(--white);
    margin-bottom: 40px;
}

.mini-hero h1 {
    font-size: 2.5rem;
    color: var(--secondary-gold);
    text-shadow: 2px 2px 10px rgba(0,0,0,0.5);
    margin: 0;
}

/* Floating Widgets */
.floating-wa {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background-color: #25d366;
    color: white;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 35px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
    z-index: 1000;
    transition: all 0.3s ease;
    animation: pulse-wa 2s infinite;
}

.floating-wa:hover {
    transform: scale(1.1);
    color: white;
}

@keyframes pulse-wa {
    0% { box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.7); }
    70% { box-shadow: 0 0 0 15px rgba(37, 211, 102, 0); }
    100% { box-shadow: 0 0 0 0 rgba(37, 211, 102, 0); }
}

.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background-color: var(--primary-green);
    color: white;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    z-index: 1000;
    cursor: pointer;
    border: none;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    transform: translateY(20px);
}

.whatsapp-float {
    position: fixed;
    bottom: 95px;
    right: 30px;
    background-color: #25d366;
    color: white;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    z-index: 1000;
    cursor: pointer;
    text-decoration: none;
    animation: pulse-wa 2s infinite;
    transition: var(--transition);
}

.whatsapp-float:hover {
    background-color: #128c7e;
    transform: scale(1.1);
    color: white;
}

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

.back-to-top:hover {
    background-color: var(--gold-dark);
    transform: translateY(-5px);
}

/* Responsive */
@media (max-width: 992px) {
    .top-info span:last-child { display: none; }
}

@media (max-width: 768px) {
    .nav-container {
        padding: 10px 5%;
    }

    .menu-toggle {
        display: block;
        font-size: 1.4rem;
        cursor: pointer;
        padding: 5px;
        transition: var(--transition);
    }

    #nav-menu {
        display: flex;
        position: fixed;
        top: 0;
        right: -100%;
        width: 80%;
        max-width: 320px;
        height: 100vh;
        background: var(--white);
        box-shadow: -10px 0 30px rgba(0,0,0,0.1);
        padding: 80px 40px;
        z-index: 998;
        transition: right 0.5s cubic-bezier(0.4, 0, 0.2, 1);
        flex-direction: column;
    }

    #nav-menu.active {
        right: 0;
    }
    
    nav ul {
        flex-direction: column;
        gap: 30px;
        align-items: flex-start;
    }

    nav ul li a {
        font-size: 1.2rem;
        color: var(--primary-green);
    }
    
    .hero-content h1 {
        font-size: clamp(2rem, 8vw, 3rem);
    }
    
    section {
        padding: 80px 5%;
    }
}

@media (max-width: 480px) {
    .logo-text { font-size: 1.1rem; }
    .logo-text span { font-size: 0.65rem; }
    .logo img { height: 45px; }
    body { padding-top: 70px; }
    .hero-content p { font-size: 0.9rem; }
}

/* ── Global Preloader ── */
#global-preloader {
    position: fixed;
    inset: 0;
    background: #ffffff;
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

#global-preloader.hidden {
    opacity: 0;
    visibility: hidden;
}

.loader-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid rgba(13, 51, 32, 0.1);
    border-top-color: var(--primary-green);
    border-radius: 50%;
    animation: loader-spin 1s linear infinite;
}

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