/* NYIDE - New York Institute of Digital Excellence - Main Styles */

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

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    color: #1a1a1a;
    overflow-x: hidden;
}

/* CSS Variables for Consistent Design */
:root {
    --primary-color: #0066cc;
    --secondary-color: #00a8ff;
    --accent-color: #ff6b35;
    --dark-color: #1a1a1a;
    --light-color: #f8fafc;
    --gray-color: #64748b;
    --white: #ffffff;
    --gradient-primary: linear-gradient(135deg, #0066cc 0%, #00a8ff 100%);
    --gradient-secondary: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --gradient-accent: linear-gradient(135deg, #ff6b35 0%, #f7931e 100%);
    --shadow-light: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-medium: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --shadow-heavy: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    --border-radius: 12px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1rem;
}

h1 {
    font-size: clamp(1.8rem, 3vw, 2.5rem);
    font-weight: 800;
}

h2 {
    font-size: clamp(1.4rem, 2.5vw, 2rem);
}

h3 {
    font-size: clamp(1.1rem, 2vw, 1.5rem);
}

p {
    margin-bottom: 1rem;
    color: var(--gray-color);
    font-size: 1.1rem;
}

/* Container and Layout */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.section {
    padding: 5rem 0;
    position: relative;
    scroll-margin-top: 100px;
}

/* Header and Navigation */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    transition: var(--transition);
}

.header.scrolled {
    background: rgba(255, 255, 255, 0.98);
    box-shadow: var(--shadow-medium);
}

.nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.nav-logo h2 {
    font-size: 1.5rem;
    font-weight: 800;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin: 0;
}

.nav-tagline {
    font-size: 0.875rem;
    color: var(--gray-color);
    font-weight: 500;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
    align-items: center;
}

.nav-link {
    text-decoration: none;
    color: var(--dark-color);
    font-weight: 500;
    transition: var(--transition);
    position: relative;
}

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

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

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

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

.dropdown-content {
    position: absolute;
    top: 100%;
    left: 0;
    background: white;
    min-width: 250px;
    box-shadow: var(--shadow-heavy);
    border-radius: var(--border-radius);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: var(--transition);
    z-index: 1000;
}

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

.dropdown-content a {
    display: block;
    padding: 1rem 1.5rem;
    text-decoration: none;
    color: var(--dark-color);
    transition: var(--transition);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.dropdown-content a:hover {
    background: var(--light-color);
    color: var(--primary-color);
}

.dropdown-content a:last-child {
    border-bottom: none;
}

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

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

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-medium);
}

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

.btn-secondary:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-2px);
}

.btn-large {
    padding: 1rem 2rem;
    font-size: 1.1rem;
}

/* Mobile Navigation */
.nav-toggle {
    display: none;
    flex-direction: column;
    cursor: pointer;
    gap: 4px;
}

.nav-toggle span {
    width: 25px;
    height: 3px;
    background: var(--dark-color);
    transition: var(--transition);
}

/* Hero Section with Parallax */
.hero {
    height: 100vh;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background: linear-gradient(135deg, rgba(0, 102, 204, 0.9), rgba(0, 168, 255, 0.8));
}

.hero-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 120%;
    height: 120%;
    background-image: url('../images/hero-campus.jpg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    z-index: -1;
    transform: translateZ(0);
}

.hero-content {
    text-align: center;
    color: white;
    z-index: 2;
    max-width: 800px;
    padding: 2.5rem 1.5rem 2.5rem 1.5rem;
    margin: 0 auto;
    background: rgba(0,0,0,0.35); /* subtle overlay for contrast */
    border-radius: 18px;
}

.hero-title {
    font-size: clamp(2.2rem, 5vw, 3.2rem);
    font-weight: 900;
    margin-bottom: 1.2rem;
    text-shadow: 0 4px 16px rgba(0,0,0,0.35);
    overflow-wrap: break-word;
    word-break: break-word;
}

.hero-subtitle {
    font-size: clamp(1.1rem, 2vw, 1.5rem);
    margin-bottom: 1.2rem;
    color: rgba(255,255,255,0.95);
    text-shadow: 0 2px 8px rgba(0,0,0,0.25);
    overflow-wrap: break-word;
    word-break: break-word;
}

.hero-cta {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    margin-top: 2rem;
}

/* Parallax Sections */
.parallax-section {
    position: relative;
    background-attachment: fixed;
    background-size: cover;
    background-position: center;
    min-height: 60vh;
    display: flex;
    align-items: center;
}

.parallax-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    z-index: 1;
}

.parallax-content {
    position: relative;
    z-index: 2;
    color: white;
    text-align: center;
}

/* Features Section */
.features {
    background: var(--light-color);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.feature-card {
    background: white;
    padding: 2.5rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-light);
    text-align: left;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
    align-items: flex-start;
}

.feature-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--gradient-primary);
}

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

.feature-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 1.5rem;
    background: var(--gradient-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: white;
}

.feature-card h3 {
    color: var(--dark-color);
    margin-bottom: 1rem;
}

/* Stats Section */
.stats {
    background: var(--gradient-primary);
    color: white;
    text-align: center;
}

.stats-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: stretch;
    gap: 3rem 5rem;
    margin-top: 3rem;
}

.stat-item {
    flex: 1 1 220px;
    min-width: 200px;
    max-width: 260px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem 1rem;
    background: rgba(0,0,0,0.15);
    border-radius: 18px;
    box-shadow: 0 2px 12px 0 rgba(0,0,0,0.08);
    margin: 0 0.5rem;
}

.stat-number {
    font-size: 3rem;
    font-weight: 900;
    display: block;
    margin-bottom: 0.5rem;
}

.stat-label {
    font-size: 1.1rem;
    opacity: 0.9;
}

/* Course Preview Section */
.course-preview {
    padding: 5rem 0;
}

.course-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2rem;
    align-items: stretch;
}

.course-card {
    display: flex;
    flex-direction: column;
    min-height: 420px;
    background: white;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow-light);
    transition: var(--transition);
    position: relative;
}

.course-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-medium);
}

.course-image {
    height: 200px;
    background-size: cover;
    background-position: center;
    position: relative;
}

.course-category {
    position: absolute;
    top: 1rem;
    left: 1rem;
    background: var(--gradient-accent);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 600;
}

.course-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    flex: 1;
    padding: 2rem;
}

.course-content .btn {
    margin-top: auto;
    align-self: center;
}

.course-card h3 {
    color: var(--dark-color);
    margin-bottom: 1rem;
    font-size: 1.3rem;
}

.course-meta {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
    font-size: 0.9rem;
    color: var(--gray-color);
}

.course-price {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.course-actions {
    margin-top: auto;
}

.section-nav {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 2rem;
}

.section-nav a {
    background: var(--secondary-color);
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 30px;
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
    box-shadow: var(--shadow-light);
}

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

/* CTA Section */
.cta {
    background: var(--gradient-secondary);
    color: white;
    text-align: center;
}

.cta h2 {
    color: white;
    margin-bottom: 1rem;
}

.cta p {
    color: rgba(255, 255, 255, 0.9);
    font-size: 1.2rem;
    margin-bottom: 2rem;
}

.cta .section-header > div {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 2rem;
}

.cta .btn {
    margin-top: 0 !important;
}

/* Footer */
.footer {
    background: var(--dark-color);
    color: white;
    padding: 3rem 0 1rem;
}

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

.footer-section h3 {
    color: white;
    margin-bottom: 1rem;
}

.footer-section p {
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 1rem;
}

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

.footer-section ul li {
    margin-bottom: 0.5rem;
}

.footer-section ul li a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: var(--transition);
}

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

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

.social-links a {
    width: 40px;
    height: 40px;
    background: var(--gradient-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    text-decoration: none;
    transition: var(--transition);
}

.social-links a:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-medium);
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.footer-links {
    display: flex;
    gap: 2rem;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: var(--transition);
}

.footer-links a:hover {
    color: var(--secondary-color);
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

/* Scroll Animations */
.animate-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s ease-out;
}

.animate-on-scroll.animated {
    opacity: 1;
    transform: translateY(0);
}

/* Responsive Design */
@media (max-width: 768px) {
    .nav-toggle {
        display: flex;
        position: fixed;
        top: 1.2rem;
        right: 1.2rem;
        z-index: 3000;
        background: white;
        border-radius: 8px;
        padding: 0.5rem;
        box-shadow: var(--shadow-light);
    }
    .nav-menu {
        display: none;
    }
    .nav-menu.active {
        display: block !important;
        position: fixed !important;
        top: 56px !important; /* Adjust to your header height */
        left: 0 !important;
        width: 100vw !important;
        background: #fff !important;
        border: 2px solid #0074d9 !important;
        z-index: 9999 !important;
        opacity: 1 !important;
        visibility: visible !important;
        transform: none !important;
        transition: none !important;
    }

    .hero-cta,
    .cta .section-header > div,
    .section-header > div {
        flex-direction: column;
        align-items: center;
        gap: 1rem;
    }

    .course-content {
        align-items: center;
        text-align: center;
    }

    .features-grid .feature-card {
        align-items: center;
        text-align: center;
    }

    .stats-grid {
        gap: 2rem 1rem;
    }

    .stat-item {
        min-width: 160px;
        max-width: 100%;
        padding: 1.2rem 0.5rem;
    }

    .footer-bottom {
        flex-direction: column;
        text-align: center;
    }

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

    .container {
        padding: 0 1rem;
    }

    .section {
        padding: 3rem 0;
    }

    .nav-contact {
        display: none !important;
    }
    .mobile-apply {
        display: block !important;
    }
}

.mobile-apply {
    display: none;
}

@media (max-width: 480px) {
    .stats-grid {
        flex-direction: column;
        gap: 1.5rem 0;
    }

    .stat-item {
        width: 100%;
        margin: 0 auto;
    }

    .course-grid {
        grid-template-columns: 1fr;
    }

    .hero-title {
        font-size: 2.5rem;
    }

    .hero-subtitle {
        font-size: 1.1rem;
    }
}

/* Print Styles */
@media print {
    .header,
    .nav-toggle,
    .btn,
    .footer {
        display: none;
    }

    .hero {
        height: auto;
        padding: 2rem 0;
    }

    .parallax-section {
        background-attachment: scroll;
    }
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
    :root {
        --primary-color: #0052cc;
        --secondary-color: #0080ff;
        --gray-color: #333333;
    }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    .hero-background {
        background-attachment: scroll;
    }

    .parallax-section {
        background-attachment: scroll;
    }
}

.filter-btn {
    min-width: 160px;
    text-align: center;
    margin-bottom: 0.5rem;
}

/* VIEW ALL COURSES BUTTON */
.course-preview > .container > div[style*="text-align: center"] {
    display: flex;
    justify-content: center;
    margin-top: 3rem;
}

/* ABOUT PREVIEW BUTTONS */
.section-header > div {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* TESTIMONIALS CARDS */
@media (max-width: 768px) {
    .hero-cta,
    .cta .section-header > div,
    .section-header > div {
        flex-direction: column;
        align-items: center;
        gap: 1rem;
    }
    .course-content {
        align-items: center;
        text-align: center;
    }
    .features-grid .feature-card {
        align-items: center;
        text-align: center;
    }
}

/* RESPONSIVE FIXES */
@media (max-width: 900px) {
    .hero-title {
        font-size: 2.1rem;
    }
    .hero-content {
        padding: 1.5rem 0.5rem;
    }
}
@media (max-width: 768px) {
    .hero-content {
        padding: 1.2rem 0.2rem;
    }
    .hero-title {
        font-size: 1.5rem;
    }
    .hero-subtitle {
        font-size: 1rem;
    }
    .course-content {
        padding: 1.2rem 0.5rem;
    }
    .features-grid .feature-card {
        align-items: center;
        text-align: center;
    }
}

/* Add top margin to section-header if it's the first child in a section */
.section > .container > .section-header:first-child {
    margin-top: 2.5rem;
}

