/* =========================================
   TEKNOFEST PAKISTAN - MAIN STYLESHEET
   ========================================= */

/* 1. BASE STYLES & VARIABLES */
:root {
    --primary-color: #0066cc;
    --secondary-color: #00a86b;
    --accent-color: #ff6600;
    --dark-color: #0a1f44;
    --light-color: #f8f9fa;
    --text-color: #333333;
    --text-light: #666666;
    --white: #ffffff;
    --black: #000000;
    --gray: #e0e0e0;
    --shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s ease;
    --border-radius: 8px;
    --container-width: 1200px;
    --header-height: 80px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    color: var(--text-color);
    background-color: var(--white);
    line-height: 1.6;
    overflow-x: hidden;
}

.container {
    width: 100%;
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 20px;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

ul {
    list-style: none;
}

.btn {
    display: inline-block;
    padding: 14px 32px;
    border-radius: var(--border-radius);
    font-weight: 600;
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
    border: none;
    font-size: 16px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.btn-primary {
    background-color: var(--primary-color);
    color: var(--white);
}

.btn-primary:hover {
    background-color: #0052a3;
    transform: translateY(-3px);
    box-shadow: var(--shadow);
}

.btn-secondary {
    background-color: var(--secondary-color);
    color: var(--white);
}

.btn-secondary:hover {
    background-color: #008755;
    transform: translateY(-3px);
    box-shadow: var(--shadow);
}

.btn-popup {
    background-color: var(--accent-color);
    color: var(--white);
    font-size: 18px;
    padding: 18px 40px;
    margin-top: 20px;
    display: inline-block;
}

.section-title {
    font-size: 2.5rem;
    margin-bottom: 20px;
    color: var(--dark-color);
    text-align: center;
    position: relative;
    padding-bottom: 15px;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background-color: var(--primary-color);
}

.section-subtitle {
    font-size: 1.2rem;
    color: var(--text-light);
    text-align: center;
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.section-description {
    font-size: 1.1rem;
    color: var(--text-light);
    text-align: center;
    max-width: 800px;
    margin: 0 auto 40px;
    line-height: 1.8;
}

.highlight {
    color: var(--primary-color);
}

/* 2. HEADER & NAVIGATION */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background-color: rgba(255, 255, 255, 0.95);
    box-shadow: var(--shadow);
    z-index: 1000;
    height: var(--header-height);
    transition: var(--transition);
}

.header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 100%;
}

.logo a {
    display: flex;
    align-items: center;
}

.logo img {
    height: 50px;
    width: auto;
}

.mobile-logo {
    display: none;
}

.main-nav .nav-list {
    display: flex;
    gap: 30px;
}

.main-nav .nav-list a {
    font-weight: 600;
    font-size: 16px;
    position: relative;
    padding: 5px 0;
}

.main-nav .nav-list a:hover {
    color: var(--primary-color);
}

.main-nav .nav-list a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--primary-color);
    transition: var(--transition);
}

.main-nav .nav-list a:hover::after {
    width: 100%;
}

/* Submenu */
.has-submenu {
    position: relative;
}

.has-submenu > a {
    display: flex;
    align-items: center;
    gap: 5px;
}

.has-submenu > a i {
    font-size: 12px;
    transition: var(--transition);
}

.has-submenu:hover > a i {
    transform: rotate(180deg);
}

.submenu {
    position: absolute;
    top: 100%;
    left: 0;
    background-color: var(--white);
    min-width: 200px;
    box-shadow: var(--shadow);
    border-radius: var(--border-radius);
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: var(--transition);
    z-index: 100;
    padding: 10px 0;
}

.has-submenu:hover .submenu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.submenu li a {
    display: block;
    padding: 10px 20px;
    font-weight: 500;
}

.submenu li a:hover {
    background-color: rgba(0, 102, 204, 0.1);
    color: var(--primary-color);
}

/* Mobile Menu */
.mobile-menu-toggle {
    display: none;
    font-size: 24px;
    cursor: pointer;
    color: var(--dark-color);
}

.mobile-menu {
    position: fixed;
    top: 0;
    right: -100%;
    width: 300px;
    height: 100vh;
    background-color: var(--white);
    box-shadow: -5px 0 15px rgba(0, 0, 0, 0.1);
    z-index: 1001;
    transition: var(--transition);
    overflow-y: auto;
    padding: 30px 20px;
}

.mobile-menu.active {
    right: 0;
}

.mobile-menu-header {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 30px;
}

.close-menu {
    font-size: 24px;
    cursor: pointer;
    color: var(--dark-color);
}

.mobile-nav-list li {
    margin-bottom: 15px;
}

.mobile-nav-list a {
    display: block;
    padding: 12px 0;
    font-weight: 600;
    font-size: 18px;
    border-bottom: 1px solid var(--gray);
}

.mobile-nav-list a:hover {
    color: var(--primary-color);
}

/* 3. HERO SECTION */
.hero {
    position: relative;
    height: 100vh;
    min-height: 700px;
    margin-top: var(--header-height);
    overflow: hidden;
}

.hero video {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    min-width: 100%;
    min-height: 100%;
    width: auto;
    height: auto;
    z-index: -1;
    object-fit: cover;
}

/* 4. HIGHLIGHTS VIDEO SECTION */
.highlights-video {
    padding: 80px 0;
    background-color: var(--light-color);
}

.video-wrapper {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
    height: 0;
    margin-top: 30px;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow);
}

.video-wrapper iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

/* 5. OVERVIEW SECTION */
.overview {
    padding: 80px 0;
}

.overview-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.overview-text .section-subtitle {
    text-align: left;
    margin-bottom: 10px;
}

.overview-text .section-title {
    text-align: left;
    margin-bottom: 25px;
}

.overview-text .section-title::after {
    left: 0;
    transform: none;
}

.description {
    font-size: 1.1rem;
    line-height: 1.8;
    margin-bottom: 30px;
    color: var(--text-light);
}

.info-item {
    display: flex;
    gap: 20px;
    margin-top: 30px;
    align-items: flex-start;
}

.info-icon {
    width: 50px;
    height: 50px;
    background-color: rgba(0, 102, 204, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-color);
    font-size: 20px;
    flex-shrink: 0;
}

.info-content h3 {
    font-size: 1.3rem;
    margin-bottom: 5px;
    color: var(--dark-color);
}

.info-content p {
    color: var(--text-light);
}

.image-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.image-grid img {
    width: 100%;
    height: 250px;
    object-fit: cover;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.image-grid img:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.15);
}

.image-grid img:nth-child(3) {
    grid-column: 1 / 3;
    height: 200px;
}

/* 6. STATS SECTION */
.stats {
    padding: 80px 0;
    background-color: var(--dark-color);
    color: var(--white);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 30px;
    text-align: center;
}

.stat-item {
    padding: 20px;
}

.stat-number {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 10px;
    color: var(--accent-color);
}

.stat-title {
    font-size: 1.1rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* 7. COMPETITIONS SECTION */
.competitions {
    padding: 80px 0;
    background-color: var(--light-color);
}

.competitions-list {
    margin-bottom: 40px;
}

.competition-categories {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    max-width: 900px;
    margin: 0 auto;
}

.competition-categories li {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 15px 20px;
    background-color: var(--white);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.competition-categories li:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.competition-categories i {
    color: var(--secondary-color);
    font-size: 14px;
}

.competition-categories a {
    font-weight: 600;
    color: var(--dark-color);
}

.competition-categories a:hover {
    color: var(--primary-color);
}

.competition-cta {
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
}

.competition-cta p {
    font-size: 1.2rem;
    margin-bottom: 30px;
    color: var(--text-color);
    line-height: 1.8;
}

/* 8. VOLUNTEER SECTION */
.volunteer {
    padding: 100px 0;
    background: linear-gradient(rgba(10, 31, 68, 0.9), rgba(10, 31, 68, 0.9)), url('assets/images/volunteer-bg.jpg');
    background-size: cover;
    background-position: center;
    color: var(--white);
    text-align: center;
}

.volunteer .section-title {
    color: var(--white);
    margin-bottom: 10px;
}

.volunteer .section-title::after {
    background-color: var(--accent-color);
}

.volunteer .section-subtitle {
    color: rgba(255, 255, 255, 0.8);
    font-size: 1.8rem;
    margin-bottom: 0;
}

.animated-headline {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    margin: 20px 0 30px;
    font-size: 2.5rem;
    font-weight: 700;
}

.static-text {
    margin-right: 10px;
}

.dynamic-text {
    position: relative;
    height: 60px;
    width: 300px;
    overflow: hidden;
    margin-right: 10px;
}

.word {
    position: absolute;
    top: 0;
    left: 0;
    opacity: 0;
    color: var(--accent-color);
    animation: rotateWords 9s infinite;
}

.word:nth-child(2) {
    animation-delay: 3s;
}

.word:nth-child(3) {
    animation-delay: 6s;
}

@keyframes rotateWords {
    0%, 20% {
        opacity: 0;
        transform: translateY(20px);
    }
    5%, 15% {
        opacity: 1;
        transform: translateY(0);
    }
    25%, 100% {
        opacity: 0;
        transform: translateY(-20px);
    }
}

.volunteer .description {
    max-width: 700px;
    margin: 0 auto 40px;
    color: rgba(255, 255, 255, 0.9);
}

/* 9. SPEAKERS SECTION */
.speakers {
    padding: 80px 0;
}

.speakers-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
    margin-top: 40px;
}

.speaker-card {
    background-color: var(--white);
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.speaker-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.15);
}

.speaker-image {
    height: 250px;
    overflow: hidden;
}

.speaker-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.speaker-card:hover .speaker-image img {
    transform: scale(1.05);
}

.speaker-info {
    padding: 20px;
    text-align: center;
}

.speaker-info h4 {
    font-size: 1.3rem;
    margin-bottom: 5px;
    color: var(--dark-color);
}

.speaker-info p {
    color: var(--text-light);
    font-size: 0.9rem;
}

/* 10. PARTNERS SECTION */
.partners {
    padding: 80px 0;
    background-color: var(--light-color);
}

.partners .section-title {
    margin-bottom: 40px;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.partners-slider {
    position: relative;
    padding: 0 40px;
}

.swiper-slide {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 120px;
    background-color: var(--white);
    border-radius: var(--border-radius);
    padding: 20px;
}

.swiper-slide img {
    max-height: 80px;
    width: auto;
    filter: grayscale(100%);
    opacity: 0.7;
    transition: var(--transition);
}

.swiper-slide img:hover {
    filter: grayscale(0);
    opacity: 1;
}

.swiper-button-next, .swiper-button-prev {
    color: var(--primary-color);
    background-color: var(--white);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    box-shadow: var(--shadow);
}

.swiper-button-next::after, .swiper-button-prev::after {
    font-size: 18px;
}

/* 11. FOOTER */
.footer {
    padding: 60px 0 30px;
    background-color: var(--dark-color);
    color: var(--white);
    text-align: center;
}

.footer-logo {
    margin-bottom: 30px;
}

.footer-logo img {
    height: 60px;
    width: auto;
    margin: 0 auto;
}

.footer-description {
    font-size: 1.1rem;
    line-height: 1.8;
    margin-bottom: 30px;
    color: rgba(255, 255, 255, 0.8);
}

.social-links {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 40px;
}

.social-links a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    font-size: 18px;
    transition: var(--transition);
}

.social-links a:hover {
    background-color: var(--primary-color);
    transform: translateY(-3px);
}

.footer-nav ul {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 30px;
}

.footer-nav a {
    font-weight: 500;
    color: rgba(255, 255, 255, 0.8);
}

.footer-nav a:hover {
    color: var(--accent-color);
}

.copyright {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.9rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 20px;
}

/* 12. POPUP MODAL */
.popup-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
}

.popup-modal.active {
    opacity: 1;
    visibility: visible;
}

.popup-content {
    background-color: var(--white);
    padding: 40px;
    border-radius: var(--border-radius);
    text-align: center;
    max-width: 500px;
    width: 90%;
    position: relative;
    transform: translateY(20px);
    transition: var(--transition);
}

.popup-modal.active .popup-content {
    transform: translateY(0);
}

.close-popup {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 28px;
    cursor: pointer;
    color: var(--text-light);
}

.close-popup:hover {
    color: var(--dark-color);
}

.popup-content h3 {
    font-size: 2rem;
    margin-bottom: 20px;
    color: var(--dark-color);
}

/* 13. BACK TO TOP BUTTON */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background-color: var(--primary-color);
    color: var(--white);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 20px;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
    z-index: 999;
    border: none;
}

.back-to-top.active {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    background-color: var(--dark-color);
    transform: translateY(-5px);
}

/* 14. RESPONSIVE STYLES */
@media (max-width: 992px) {
    .section-title {
        font-size: 2.2rem;
    }
    
    .overview-content {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    
    .stats-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .speakers-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .competition-categories {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .header {
        height: 70px;
    }
    
    .hero {
        min-height: 500px;
        height: 70vh;
    }
    
    .mobile-menu-toggle {
        display: block;
    }
    
    .main-nav {
        display: none;
    }
    
    .normal-logo {
        display: none;
    }
    
    .mobile-logo {
        display: block;
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .speakers-grid {
        grid-template-columns: 1fr;
        max-width: 350px;
        margin-left: auto;
        margin-right: auto;
    }
    
    .animated-headline {
        font-size: 1.8rem;
        flex-direction: column;
    }
    
    .dynamic-text {
        width: 220px;
        height: 50px;
        margin: 10px 0;
    }
    
    .footer-nav ul {
        flex-direction: column;
        gap: 10px;
    }
}

@media (max-width: 576px) {
    .section-title {
        font-size: 1.8rem;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .image-grid {
        grid-template-columns: 1fr;
    }
    
    .image-grid img:nth-child(3) {
        grid-column: 1;
    }
    
    .swiper-button-next, .swiper-button-prev {
        display: none;
    }
    
    .partners-slider {
        padding: 0;
    }
}