/* ========================================
   Fort Education System - Modern CSS
   ======================================== */

/* Color Variables */
:root {
    --primary-color: #0B4DA2;
    --secondary-color: #FFFFFF;
    --accent-color: #F9C900;
    --text-dark: #333333;
    --text-light: #666666;
    --bg-light: #F8F9FA;
    --shadow: 0 5px 15px rgba(0,0,0,0.1);
    --shadow-lg: 0 10px 30px rgba(0,0,0,0.15);
}

/* Reset & Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    color: var(--text-dark);
    line-height: 1.6;
    overflow-x: hidden;
}

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

a {
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
}

ul {
    list-style: none;
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header & Navigation */
header {
    background: var(--secondary-color);
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.top-bar {
    background: var(--primary-color);
    color: var(--secondary-color);
    padding: 10px 0;
    font-size: 14px;
}

.top-bar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.top-bar a {
    color: var(--secondary-color);
    margin-left: 20px;
}

.top-bar a:hover {
    color: var(--accent-color);
}

nav {
    padding: 15px 0;
}

nav .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

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

.logo img {
    height: 60px;
    width: auto;
}

.logo h1 {
    color: var(--primary-color);
    font-size: 24px;
    font-weight: bold;
}

.nav-links {
    display: flex;
    gap: 30px;
    align-items: center;
}

.nav-links a {
    color: var(--text-dark);
    font-weight: 500;
    padding: 8px 0;
    position: relative;
}

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

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

.nav-links a:hover,
.nav-links a.active {
    color: var(--primary-color);
}

/* Dropdown Menu */
.nav-links .dropdown {
    position: relative;
}

.nav-links .dropdown-toggle {
    display: flex;
    align-items: center;
    gap: 5px;
    cursor: pointer;
}

.nav-links .dropdown-toggle i {
    font-size: 12px;
    transition: transform 0.3s ease;
}

.nav-links .dropdown:hover .dropdown-toggle i {
    transform: rotate(180deg);
}

.nav-links .dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background: white;
    min-width: 220px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
    border-radius: 8px;
    padding: 10px 0;
    margin-top: 15px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    z-index: 1000;
}

.nav-links .dropdown:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    margin-top: 10px;
}

.nav-links .dropdown-menu li {
    margin: 0;
}

.nav-links .dropdown-menu a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 20px;
    color: var(--text-dark);
    font-weight: 500;
    transition: all 0.3s ease;
    border-left: 3px solid transparent;
}

.nav-links .dropdown-menu a::after {
    display: none;
}

.nav-links .dropdown-menu a i {
    font-size: 16px;
    color: var(--primary-color);
    width: 20px;
}

.nav-links .dropdown-menu a:hover {
    background: var(--bg-light);
    border-left-color: var(--primary-color);
    color: var(--primary-color);
    padding-left: 25px;
}

.menu-toggle {
    display: none;
    flex-direction: column;
    cursor: pointer;
    gap: 5px;
}

.menu-toggle span {
    width: 25px;
    height: 3px;
    background: var(--primary-color);
    transition: all 0.3s ease;
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, var(--primary-color) 0%, #0a3a7a 100%);
    color: var(--secondary-color);
    padding: 100px 0;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('../images/pattern.png') repeat;
    opacity: 0.1;
}

.hero .container {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 50px;
}

.hero-content {
    flex: 1;
}

.hero h1 {
    font-size: 48px;
    font-weight: bold;
    margin-bottom: 20px;
    line-height: 1.2;
}

.hero .tagline {
    font-size: 20px;
    margin-bottom: 30px;
    color: var(--accent-color);
}

.hero p {
    font-size: 18px;
    margin-bottom: 30px;
    line-height: 1.8;
}

.hero-image {
    flex: 1;
    text-align: center;
}

.hero-image img {
    max-width: 400px;
    animation: float 3s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-20px); }
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 12px 30px;
    border-radius: 50px;
    font-weight: 600;
    transition: all 0.3s ease;
    cursor: pointer;
    border: none;
    font-size: 16px;
}

.btn-primary {
    background: var(--accent-color);
    color: var(--primary-color);
}

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

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

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

.btn-group {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

/* Section Styles */
section {
    padding: 80px 0;
}

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

.section-header h2 {
    font-size: 36px;
    color: var(--primary-color);
    margin-bottom: 15px;
    position: relative;
    display: inline-block;
}

.section-header h2::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: var(--accent-color);
    border-radius: 2px;
}

.section-header p {
    color: var(--text-light);
    font-size: 18px;
    max-width: 700px;
    margin: 20px auto 0;
}

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

.card {
    background: var(--secondary-color);
    border-radius: 15px;
    padding: 30px;
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
    border: 1px solid #e0e0e0;
}

.card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-lg);
}

.card-icon {
    width: 70px;
    height: 70px;
    background: linear-gradient(135deg, var(--primary-color), #0a3a7a);
    color: var(--secondary-color);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-size: 30px;
    margin-bottom: 20px;
}

.card h3 {
    color: var(--primary-color);
    font-size: 22px;
    margin-bottom: 15px;
}

.card p {
    color: var(--text-light);
    line-height: 1.8;
}

/* Stats Section */
.stats {
    background: var(--primary-color);
    color: var(--secondary-color);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 40px;
    text-align: center;
}

.stat-item h3 {
    font-size: 48px;
    color: var(--accent-color);
    margin-bottom: 10px;
}

.stat-item p {
    font-size: 18px;
}

/* Form Styles */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--text-dark);
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 16px;
    transition: all 0.3s ease;
    font-family: inherit;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(11, 77, 162, 0.1);
}

.form-group textarea {
    resize: vertical;
    min-height: 120px;
}

/* Footer */
footer {
    background: #1a1a1a;
    color: #ffffff;
    padding: 50px 0 20px;
}

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

.footer-section h3 {
    color: var(--accent-color);
    margin-bottom: 20px;
    font-size: 20px;
}

.footer-section p,
.footer-section a {
    color: #cccccc;
    line-height: 2;
}

.footer-section a:hover {
    color: var(--accent-color);
}

.social-links {
    display: flex;
    gap: 15px;
    margin-top: 15px;
}

.social-links a {
    width: 40px;
    height: 40px;
    background: var(--primary-color);
    color: var(--secondary-color);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-size: 18px;
}

.social-links a:hover {
    background: var(--accent-color);
    color: var(--primary-color);
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid #333;
    color: #888;
}

/* Responsive Design */

/* Tablet Landscape and Below (1024px) */
@media (max-width: 1024px) {
    .container {
        padding: 0 15px;
    }

    .hero h1 {
        font-size: 42px !important;
    }

    .hero p {
        font-size: 18px !important;
    }

    /* Director/Principal Messages - Stack on tablets */
    .hero .container {
        padding: 0 20px !important;
    }
}

/* Tablet Portrait and Below (768px) */
@media (max-width: 768px) {
    /* Top Bar - Hide email on mobile */
    .top-bar {
        font-size: 12px;
    }

    .top-bar .container {
        flex-direction: column;
        gap: 10px;
        text-align: center;
    }

    .top-bar-left a:last-child {
        display: none;
    }

    /* Mobile Menu */
    .menu-toggle {
        display: flex;
    }

    .nav-links {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--secondary-color);
        flex-direction: column;
        padding: 20px;
        box-shadow: var(--shadow);
        display: none;
        z-index: 999;
    }

    .nav-links.active {
        display: flex;
    }

    .nav-links a {
        padding: 12px 0;
        border-bottom: 1px solid #e0e0e0;
    }

    /* Mobile Dropdown */
    .nav-links .dropdown-menu {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        box-shadow: none;
        background: var(--bg-light);
        margin: 10px 0;
        border-radius: 5px;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease;
    }

    .nav-links .dropdown:hover .dropdown-menu,
    .nav-links .dropdown.active .dropdown-menu {
        max-height: 300px;
    }

    .nav-links .dropdown-menu a {
        padding: 10px 15px;
        font-size: 14px;
    }

    .nav-links .dropdown-toggle {
        width: 100%;
        justify-content: space-between;
    }

    /* Logo */
    .logo h1 {
        font-size: 18px;
    }

    .logo img {
        height: 45px;
    }

    /* Hero Section */
    .hero {
        padding: 60px 0 !important;
        min-height: 400px !important;
    }

    .hero .container {
        flex-direction: column;
        text-align: center;
    }

    .hero h1 {
        font-size: 32px !important;
    }

    .hero .tagline {
        font-size: 20px !important;
    }

    .hero p {
        font-size: 16px !important;
    }

    .hero-content {
        max-width: 100% !important;
    }

    .btn-group {
        flex-direction: column;
        gap: 10px !important;
    }

    .btn {
        width: 100%;
        text-align: center;
    }

    /* Stats Grid */
    .stats-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 20px;
    }

    .stat-item h3 {
        font-size: 36px;
    }

    .stat-item p {
        font-size: 14px;
    }

    /* Section Headers */
    .section-header h2 {
        font-size: 28px;
    }

    .section-header p {
        font-size: 16px;
    }

    /* Card Grid */
    .card-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    /* Footer */
    .footer-content {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .footer-section {
        text-align: center;
    }

    .social-links {
        justify-content: center;
    }

    /* About Page - Two Column Layouts */
    section [style*="grid-template-columns: 1fr 1fr"],
    section [style*="grid-template-columns: 350px 1fr"],
    section [style*="grid-template-columns: 1fr 350px"] {
        grid-template-columns: 1fr !important;
        gap: 30px !important;
    }

    /* Leadership Messages - Reverse order for better mobile UX */
    section [style*="grid-template-columns: 1fr 350px"] {
        direction: ltr;
    }

    section [style*="grid-template-columns: 1fr 350px"] > div:first-child {
        order: 2;
    }

    section [style*="grid-template-columns: 1fr 350px"] > div:last-child {
        order: 1;
    }

    /* Contact Page - Form and Map */
    section [style*="grid-template-columns: 1fr 1fr"] {
        grid-template-columns: 1fr !important;
    }

    /* Admission Process Steps */
    section [style*="grid-template-columns: repeat(auto-fit, minmax(250px, 1fr))"] {
        grid-template-columns: 1fr !important;
    }
}

/* Mobile Only (480px) */
@media (max-width: 480px) {
    /* Even smaller text on tiny screens */
    .hero h1 {
        font-size: 26px !important;
    }

    .hero .tagline {
        font-size: 18px !important;
    }

    .hero p {
        font-size: 14px !important;
    }

    /* Stats - Stack vertically on very small screens */
    .stats-grid {
        grid-template-columns: 1fr !important;
    }

    .section-header h2 {
        font-size: 24px;
    }

    /* Buttons */
    .btn {
        padding: 12px 25px !important;
        font-size: 14px !important;
    }

    /* Cards - More compact padding */
    .card {
        padding: 20px;
    }

    .card h3 {
        font-size: 20px;
    }

    /* Leadership Messages - Smaller images */
    section [style*="width: 250px; height: 250px"] {
        width: 180px !important;
        height: 180px !important;
        font-size: 60px !important;
    }

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

    /* Top bar - Even more compact */
    .top-bar {
        padding: 8px 0;
    }

    .top-bar a {
        font-size: 11px;
    }
}

/* Utilities */
.bg-light {
    background: var(--bg-light);
}

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

.mt-30 {
    margin-top: 30px;
}

.mb-30 {
    margin-bottom: 30px;
}
