/* ============================================
   Responsive Design - Tablets & Mobile
   ============================================ */

/* ============================================
   Tablet Breakpoint (768px and below)
   ============================================ */
@media (max-width: 768px) {
    /* Navigation */
    .hamburger {
        display: flex;
    }

    .nav-links {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-light) 100%);
        flex-direction: column;
        gap: 0;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease;
        z-index: 999;
    }

    .nav-links.active {
        max-height: calc(100vh - 60px);
        overflow-y: auto;
        overflow-x: hidden;
    }

    /* Scrollbar styling for mobile nav */
    .nav-links.active::-webkit-scrollbar {
        width: 6px;
    }

    .nav-links.active::-webkit-scrollbar-track {
        background: rgba(255, 255, 255, 0.1);
    }

    .nav-links.active::-webkit-scrollbar-thumb {
        background: rgba(255, 255, 255, 0.3);
        border-radius: 3px;
    }

    .nav-links.active::-webkit-scrollbar-thumb:hover {
        background: rgba(255, 255, 255, 0.5);
    }

    .nav-links li {
        width: 100%;
        text-align: center;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }

    .nav-links .nav-link {
        display: block;
        padding: 1rem;
        transition: background-color 0.3s ease;
    }

    .nav-links .nav-link::after {
        display: none;
    }

    .nav-links .nav-link:hover {
        background-color: rgba(255, 255, 255, 0.1);
    }

    .nav-links {
        font-size: 0.95rem;
    }

    /* Typography */
    .hero-title {
        font-size: 2.5rem;
    }

    .hero-subtitle {
        font-size: 1.1rem;
    }

    .section-title {
        font-size: 2rem;
    }

    /* Navigation */
    .nav-links {
        gap: 1rem;
        font-size: 0.95rem;
    }

    /* Hero Section */
    .hero {
        padding: 0;
        margin: 0;
    }

    .hero-image {
        width: 100%;
        height: auto;
    }

    .hero-meta {
        gap: 1rem;
        flex-direction: column;
    }

    .date-badge,
    .location-badge {
        width: 100%;
        max-width: 300px;
    }

    .countdown-display {
        gap: 1rem;
    }

    .countdown-item {
        min-width: 80px;
        padding: 1rem;
    }

    .countdown-number {
        font-size: 2rem;
    }

    /* About Section */
    .about-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .about-text h3 {
        font-size: 1.15rem;
    }

    .about-highlights {
        grid-template-columns: 1fr;
    }

    /* Research Grid */
    .research-grid {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
        gap: 1rem;
    }

    .research-item {
        padding: 1.5rem 1rem;
    }

    .research-icon {
        font-size: 2rem;
    }

    .research-item h4 {
        font-size: 0.9rem;
    }

    /* Timeline */
    .timeline::before {
        left: 20px;
    }

    .timeline-item:nth-child(odd) .timeline-date,
    .timeline-item:nth-child(even) .timeline-date {
        text-align: left;
        width: 100%;
        margin-left: 0;
        padding-left: 60px;
        padding-right: 0;
    }

    .timeline-item:nth-child(odd) .timeline-content,
    .timeline-item:nth-child(even) .timeline-content {
        text-align: left;
        width: 100%;
        margin-left: 0;
        padding-left: 60px;
        padding-right: 0;
        border-left: 3px solid var(--color-primary-lighter) !important;
        border-right: none !important;
    }

    .timeline-date::after,
    .timeline-item:nth-child(even) .timeline-date::after {
        left: 12px;
        right: auto;
    }

    /* Registration */
    .registration-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    /* Contact */
    .contact-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    /* Programme/Highlights */
    .highlights {
        grid-template-columns: 1fr;
    }

    /* Details */
    .details-grid {
        grid-template-columns: 1fr;
    }

    /* Sections */
    section {
        padding: 60px 20px;
    }
}

/* ============================================
   Mobile Breakpoint (480px and below)
   ============================================ */
@media (max-width: 480px) {
    /* Root variables - smaller spacing */
    :root {
        --spacing: 0.75rem;
    }

    /* Typography */
    .hero-title {
        font-size: 1.8rem;
    }

    .hero-subtitle {
        font-size: 1rem;
    }

    .section-title {
        font-size: 1.5rem;
        margin-bottom: 2rem;
    }

    /* Navigation */
    .hamburger {
        display: flex;
    }

    .nav-links {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-light) 100%);
        flex-direction: column;
        gap: 0;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease;
        z-index: 999;
    }

    .nav-links.active {
        max-height: calc(100vh - 50px);
        overflow-y: auto;
        overflow-x: hidden;
    }

    /* Scrollbar styling for mobile nav */
    .nav-links.active::-webkit-scrollbar {
        width: 6px;
    }

    .nav-links.active::-webkit-scrollbar-track {
        background: rgba(255, 255, 255, 0.1);
    }

    .nav-links.active::-webkit-scrollbar-thumb {
        background: rgba(255, 255, 255, 0.3);
        border-radius: 3px;
    }

    .nav-links.active::-webkit-scrollbar-thumb:hover {
        background: rgba(255, 255, 255, 0.5);
    }

    .nav-links li {
        width: 100%;
        text-align: center;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }

    .nav-links .nav-link {
        display: block;
        padding: 0.9rem;
        font-size: 1rem;
        transition: background-color 0.3s ease;
    }

    .nav-links .nav-link::after {
        display: none;
    }

    .nav-links .nav-link:hover {
        background-color: rgba(255, 255, 255, 0.1);
    }

    .nav-container {
        flex-direction: row;
        gap: 1rem;
    }

    .logo {
        font-size: 1.2rem;
    }

    .logo-icon {
        font-size: 1.5rem;
    }

    /* Hero Section */
    .hero {
        padding: 0;
        margin: 0;
    }

    .hero-image {
        width: 100%;
        height: auto;
    }

    .hero-meta {
        flex-direction: column;
        gap: 1rem;
    }

    /* Countdown */
    .countdown-display {
        flex-wrap: wrap;
        gap: 0.8rem;
        justify-content: center;
    }

    .countdown-item {
        min-width: 70px;
        padding: 0.8rem 0.5rem;
        font-size: 0.85rem;
    }

    .countdown-number {
        font-size: 1.5rem;
    }

    .countdown-label {
        font-size: 0.75rem;
    }

    .cta-button {
        padding: 0.9rem 1.8rem;
        font-size: 1rem;
        width: 100%;
        max-width: 300px;
    }

    /* About Section */
    .about-highlights {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .highlight-card {
        padding: 1.5rem;
    }

    .highlight-icon {
        font-size: 2.5rem;
    }

    .highlight-card h4 {
        font-size: 1rem;
    }

    .highlight-card p {
        font-size: 0.85rem;
    }

    /* Target Box */
    .target-box {
        padding: 1.5rem;
        font-size: 1rem;
    }

    /* Research Grid */
    .research-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }

    .research-item {
        padding: 1rem;
    }

    .research-icon {
        font-size: 1.8rem;
        margin-bottom: 0.5rem;
    }

    .research-item h4 {
        font-size: 0.85rem;
    }

    /* Programme Highlights */
    .highlight-item {
        padding: 1.5rem;
    }

    .highlight-item h4 {
        font-size: 1rem;
    }

    .highlight-item p {
        font-size: 0.9rem;
    }

    /* Timeline */
    .timeline-item {
        margin-bottom: 2rem;
    }

    .timeline::before {
        left: 15px;
    }

    .timeline-date::after {
        width: 14px;
        height: 14px;
        left: 8px;
    }

    .timeline-date,
    .timeline-content {
        padding-left: 50px !important;
        padding-right: 0 !important;
        width: 100% !important;
        margin-left: 0 !important;
        text-align: left !important;
    }

    .timeline-content {
        border-left: 3px solid var(--color-primary-lighter) !important;
        border-right: none !important;
    }

    .sub-item {
        padding: 0.6rem 0.8rem;
        font-size: 0.9rem;
    }

    /* Details */
    .details-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .detail-card {
        padding: 1.5rem;
    }

    .detail-card h4 {
        font-size: 1.1rem;
    }

    .detail-list li {
        font-size: 0.9rem;
    }

    /* Registration */
    .dates-box,
    .submit-box {
        padding: 1.5rem;
    }

    .dates-box h3,
    .submit-box h3 {
        font-size: 1.2rem;
    }

    .date-item {
        margin-bottom: 1.2rem;
        padding-bottom: 1.2rem;
    }

    .submit-button {
        padding: 0.8rem 1.5rem;
        font-size: 0.95rem;
        width: 100%;
    }

    /* Contact */
    .organiser-info,
    .contact-persons {
        padding: 1.5rem;
    }

    .organiser-info h3,
    .contact-persons h3 {
        font-size: 1.15rem;
    }

    .person-card {
        padding: 1.2rem;
        margin-bottom: 1rem;
    }

    .person-card h4 {
        font-size: 1rem;
    }

    .contact-link {
        font-size: 0.95rem;
    }

    /* Sections */
    section {
        padding: 50px 15px;
    }

    /* Footer */
    .footer-content p {
        font-size: 0.9rem;
    }

    .footer-tagline {
        font-size: 0.85rem;
    }
}

/* ============================================
   Small Mobile (< 360px)
   ============================================ */
@media (max-width: 360px) {
    .hero-title {
        font-size: 1.5rem;
    }

    .section-title {
        font-size: 1.3rem;
    }

    .countdown-display {
        gap: 0.5rem;
    }

    .countdown-item {
        min-width: 60px;
        padding: 0.6rem 0.3rem;
    }

    .countdown-number {
        font-size: 1.2rem;
    }

    .countdown-label {
        font-size: 0.65rem;
    }

    .research-grid {
        grid-template-columns: 1fr;
    }
}

/* ============================================
   Utility Classes for Responsive
   ============================================ */
@media (max-width: 768px) {
    .hide-tablet {
        display: none !important;
    }
}

@media (max-width: 480px) {
    .hide-mobile {
        display: none !important;
    }
}

@media (min-width: 769px) {
    .hide-desktop {
        display: none !important;
    }
}
