/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 1200px) {
    .leadership-row {
        gap: 1.5rem;
    }

    .leader-card {
        min-width: 250px;
        max-width: 280px;
    }
}

/* Large Tablets and Small Laptops */
@media (max-width: 1024px) {
    .nav-links {
        display: none;
    }

    .menu-toggle {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 8px;
        background: transparent;
        border: 2px solid var(--conference-fg);
        border-radius: 8px;
        padding: 8px 16px;
        color: var(--conference-fg);
        font-weight: 600;
        margin: 0 auto;
    }

    .menu-toggle i {
        font-size: 1.2rem;
    }

    .menu-toggle::after {
        content: "Menu";
        font-family: "Poppins", sans-serif;
        font-size: 1rem;
        font-weight: 600;
    }

    .menu-toggle .fa-bars {
        display: none;
    }

    .nav-section>div:last-child {
        display: flex;
        justify-content: center;
        width: 100%;
    }

    .logo-section {
        gap: 1rem;
    }

    .logo-section img {
        height: 50px;
    }
}

@media (max-width: 992px) {
    .leadership-row {
        gap: 1.5rem;
    }

    .leader-card {
        min-width: 220px;
        max-width: 250px;
        padding: 1.5rem 1rem;
    }

    .leader-image {
        width: 140px;
        height: 140px;
    }

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

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

    .dates-timeline::before {
        left: 30px;
    }

    .timeline-item {
        width: 100%;
        padding-left: 70px;
        padding-right: 0;
    }

    .timeline-item:nth-child(odd),
    .timeline-item:nth-child(even) {
        left: 0;
    }

    .timeline-item:nth-child(odd) .timeline-content::after,
    .timeline-item:nth-child(even) .timeline-content::after {
        left: -10px;
        right: auto;
        border-right: 10px solid white;
        border-left: none;
    }

    .timeline-icon {
        left: 5px !important;
        right: auto !important;
    }
}

/* Tablets and Small Screens */
@media (max-width: 768px) {
    .contact-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }

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

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

    .nav-links .main-website-link {
        display: none;
    }

    .mobile-menu .main-website-link {
        display: flex;
        margin: 0.5rem 0;
    }

    .nav-buttons {
        flex-direction: column;
        gap: 0.5rem;
    }

    .countdown-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }

    .countdown-value {
        font-size: 2.5rem;
    }

    .view-counter {
        bottom: 120px;
        left: 20px;
    }

    .scroll-buttons {
        bottom: 20px;
        right: 20px;
    }

    .section-title h2 {
        font-size: 2rem;
    }

    .hero h1 {
        font-size: clamp(2rem, 6vw, 3.5rem);
    }

    .about-card,
    .conference-card,
    .guideline-card,
    .registration-card {
        padding: 2rem;
    }

    .resources-card {
        padding: 2rem;
    }

    .contact-card {
        padding: 2rem;
    }

    .member-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .leadership-row {
        flex-direction: column;
        align-items: center;
        gap: 1.5rem;
    }

    .leader-card {
        min-width: 280px;
        max-width: 320px;
        width: 100%;
    }

    .chairperson-card {
        min-width: 280px;
        max-width: 320px;
    }

    .leader-image {
        width: 140px;
        height: 140px;
    }

    .centered-leadership,
    .advisory-grid {
        grid-template-columns: 1fr;
    }

    .member-card {
        padding: 1.5rem;
    }

    .member-image {
        width: 120px;
        height: 120px;
    }

    .member-image-large {
        width: 140px;
        height: 140px;
    }

    .member-info h3 {
        font-size: 1.2rem;
        min-height: 2.8em;
    }

    .member-role {
        font-size: 0.95rem;
        min-height: 2.4em;
    }

    .advisory-card {
        min-height: 280px;
    }

    /* Sponsors Responsive */
    .sponsors-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
        padding: 0 0.5rem;
    }

    .sponsor-card {
        padding: 1rem 0.5rem;
        min-height: 120px;
        border-radius: 8px;
    }

    .sponsor-logo {
        font-size: 2rem;
        margin-bottom: 0.6rem;
        min-height: 40px;
    }

    .sponsor-card h4 {
        font-size: 0.9rem;
        margin-bottom: 0.3rem;
    }

    .sponsor-card p {
        font-size: 0.8rem;
    }

    /* Sponsorship FAQ Responsive */
    .sponsorship-heading {
        font-size: 1.5rem;
        margin-bottom: 2rem;
    }

    .faq-question {
        padding: 1.25rem 1.5rem 1.25rem 2.5rem;
        font-size: 1rem;
    }

    .faq-answer {
        padding: 0 1.5rem 1.25rem 2.5rem;
    }

    .faq-question::before {
        left: 1rem;
    }

    /* Chatbot Mobile */
    .chatbot-container {
        bottom: 15px !important;
        right: 10px !important;
        left: auto !important;
        transform: scale(0.85);
        transform-origin: bottom right;
    }

    .chatbot-button {
        padding: 10px 15px !important;
        font-size: 12px !important;
        border-radius: 25px !important;
        gap: 5px !important;
    }

    .chatbot-button i {
        font-size: 14px !important;
    }

    .chat-window {
        width: 320px !important;
        max-width: 95vw !important;
        height: 400px !important;
        max-height: 60vh !important;
        bottom: 60px !important;
        right: -10px !important;
    }

    .chat-header {
        padding: 12px 15px !important;
        font-size: 14px !important;
    }

    .chat-messages {
        padding: 10px !important;
        font-size: 14px !important;
    }

    .chat-input-area {
        padding: 10px !important;
    }

    .chat-input-container {
        margin-bottom: 8px !important;
        gap: 6px !important;
    }

    .chat-input {
        padding: 8px 10px !important;
        font-size: 14px !important;
        min-height: 40px !important;
    }

    .chat-send-btn {
        padding: 8px 12px !important;
        min-height: 40px !important;
        font-size: 12px !important;
    }

    .quick-question {
        padding: 4px 8px !important;
        font-size: 10px !important;
        margin: 1px !important;
    }

    .user-message,
    .assistant-message {
        padding: 6px 10px !important;
        font-size: 13px !important;
        max-width: 85% !important;
    }



    .academic-focus {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .focus-item {
        text-align: center;
        flex-direction: column;
    }

    .registration-info-grid {
        grid-template-columns: 1fr;
    }

    .info-row {
        flex-direction: column;
        gap: 1rem;
    }

    .info-fees {
        align-items: flex-start;
        width: 100%;
    }

    .timeline-phase {
        flex-direction: column;
        padding-left: 1.5rem;
    }

    .phase-date {
        margin-right: 0;
        margin-bottom: 0.5rem;
    }

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

    .conference-badge {
        font-size: 1rem;
        padding: 10px 20px;
    }

    .conference-theme h2 {
        font-size: 1.2rem;
        margin: 0.5rem 0 1.5rem 0;
    }

    .conference-details {
        gap: 0.8rem;
        margin: 1.5rem 0;
    }

    .detail-item {
        font-size: 1rem;
    }

    .hero-actions {
        flex-direction: column;
        align-items: center;
        margin: 2rem 0;
    }

    .hero-actions .btn {
        width: 100%;
        max-width: 300px;
        padding: 12px 25px;
    }

    .scroll-indicator {
        bottom: 1rem;
    }

    .scroll-indicator span {
        font-size: 0.8rem;
    }


    .compact-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .compact-card {
        padding: 1.2rem;
        min-height: 100px;
    }

    .compact-image {
        width: 70px;
        height: 70px;
    }

    .compact-info h3 {
        font-size: 1rem;
    }

    .compact-role {
        font-size: 0.85rem;
    }

    .section-title h2 {
        font-size: 2rem;
    }

    .registration-card,
    .action-card {
        padding: 20px;
    }

    th,
    td {
        padding: 8px 10px;
        font-size: 0.9rem;
    }

    .step {
        padding: 15px;
        gap: 15px;
    }

    .step-number {
        width: 35px;
        height: 35px;
        font-size: 1rem;
    }

    .step-content h4 {
        font-size: 1.1rem;
    }


}

/* Mobile Phones */
@media (max-width: 480px) {
    .container {
        padding: 0 1rem;
    }

    .section-title h2 {
        font-size: 1.8rem;
    }

    .hero {
        padding-top: 150px;
        padding-bottom: 60px;
    }

    .hero h1 {
        font-size: clamp(1.8rem, 7vw, 3rem);
    }

    .hero .cta {
        flex-direction: column;
        width: 100%;
    }

    .hero .cta .btn {
        width: 100%;
        justify-content: center;
    }

    .about-card,
    .conference-card,
    .guideline-card,
    .registration-card {
        padding: 1.5rem;
    }

    .countdown-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.8rem;
    }

    .countdown-item {
        padding: 1.5rem 0.5rem;
    }

    .countdown-value {
        font-size: 2rem;
    }

    .themes-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }

    .theme-card {
        padding: 1.5rem 1rem;
    }

    .action-card {
        padding: 2rem 1.5rem;
    }

    .member-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .member-card {
        padding: 1.5rem 1rem;
    }

    .member-image {
        width: 100px;
        height: 100px;
        border-width: 3px;
    }

    .member-image-large {
        width: 120px;
        height: 120px;
        border-width: 4px;
    }

    .member-info h3 {
        font-size: 1.1rem;
        min-height: 2.6em;
    }

    .member-role {
        font-size: 0.9rem;
        min-height: 2.2em;
    }

    .view-profile-btn {
        padding: 8px 16px;
        font-size: 0.85rem;
    }

    .advisory-card {
        min-height: 250px;
    }

    /* Sponsors Mobile */
    .sponsors-section {
        padding: 1.5rem 0;
    }

    .sponsors-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.8rem;
    }

    .sponsor-card {
        padding: 0.8rem 0.3rem;
        min-height: 110px;
    }

    .sponsor-logo {
        font-size: 1.8rem;
        margin-bottom: 0.5rem;
    }

    .sponsor-card h4 {
        font-size: 0.85rem;
    }

    .sponsor-card p {
        font-size: 0.75rem;
    }

    /* Chatbot Small Mobile */
    .chatbot-container {
        bottom: 10px !important;
        right: 8px !important;
        transform: scale(0.8);
    }

    .chatbot-button {
        padding: 8px 12px !important;
        font-size: 11px !important;
    }

    .chat-window {
        width: 300px !important;
        height: 380px !important;
        max-height: 55vh !important;
        bottom: 55px !important;
        right: -15px !important;
    }

    .chat-header {
        padding: 10px 12px !important;
        font-size: 13px !important;
    }

    .quick-questions-container {
        gap: 3px !important;
    }

    .quick-question {
        padding: 3px 6px !important;
        font-size: 9px !important;
    }

    .conference-details {
        max-width: 100%;
    }

    .detail-item {
        font-size: 0.9rem;
    }

    .hero-actions .btn {
        font-size: 1rem;
    }

    .member-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .member-card {
        padding: 1.5rem 1rem;
    }

    .member-image {
        width: 100px;
        height: 100px;
        border-width: 3px;
    }

    .member-image-large {
        width: 120px;
        height: 120px;
        border-width: 4px;
    }

    .member-info h3 {
        font-size: 1.1rem;
    }

    .view-profile-btn {
        padding: 8px 16px;
        font-size: 0.85rem;
    }

    .leadership-row {
        gap: 1rem;
    }

    .leader-card {
        min-width: 100%;
        max-width: 100%;
        padding: 1.5rem 1rem;
    }

    .leader-image {
        width: 120px;
        height: 120px;
    }

    .leader-info h3 {
        font-size: 1.2rem;
    }

    .leader-role {
        font-size: 0.95rem;
    }

}

/* Very Small Mobile Devices */
@media (max-width: 360px) {
    .container {
        padding: 0 0.8rem;
    }

    .section-title h2 {
        font-size: 1.6rem;
    }

    .hero h1 {
        font-size: clamp(1.6rem, 8vw, 2.5rem);
    }

    .countdown-grid {
        grid-template-columns: 1fr;
        gap: 0.5rem;
    }

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

    .action-grid {
        gap: 1rem;
    }

    /* Sponsors Very Small */
    .sponsors-grid {
        grid-template-columns: 1fr;
        gap: 0.8rem;
        max-width: 280px;
    }

    .sponsor-card {
        min-height: 100px;
        padding: 1rem;
    }

    /* Leadership Very Small */
    .horizontal-profile-card {
        width: 120px;
    }

    /* Chatbot Ultra Compact */
    .chatbot-container {
        transform: scale(0.75);
        right: 5px !important;
        bottom: 8px !important;
    }

    .chat-window {
        width: 280px !important;
        height: 350px !important;
        right: -20px !important;
    }

    .chatbot-button::after {
        content: "Ask" !important;
    }
}

/* Mobile Scrollbar */
@media (max-width: 768px) {
    ::-webkit-scrollbar {
        width: 8px;
    }

    ::-webkit-scrollbar-thumb {
        border: 2px solid #f7fafc;
    }

    [data-theme="dark"] ::-webkit-scrollbar-thumb {
        border: 2px solid #2d3748;
    }
}

/* Small Mobile Menu Toggle */
@media (max-width: 480px) {
    .menu-toggle {
        padding: 6px 12px;
        font-size: 0.9rem;
        gap: 6px;
    }

    .menu-toggle i {
        font-size: 1.1rem;
    }
}

/* Prevent body scroll when chat is open */
body.chat-open {
    overflow: hidden;
    position: fixed;
    width: 100%;
}

/* Fix iOS zoom on input */
input[type="text"] {
    font-size: 16px;
    transform: scale(1);
}

/* Dark mode support for sponsorship */
[data-theme="dark"] .sponsorship-section {
    background: linear-gradient(135deg, rgba(45, 55, 72, 0.8) 0%, rgba(74, 85, 104, 0.8) 100%);
}

[data-theme="dark"] .sponsorship-section::before {
    opacity: 0.05;
}

[data-theme="dark"] .faq-item {
    background: var(--conference-muted);
}



/* Large Tablets (1024px and below) */
@media (max-width: 1024px) {
    .header-content {
        padding: 0.5rem 0 !important;
    }

    .logo-section {
        padding: 0.5rem 0 !important;
        gap: 1rem !important;
    }

    .logo-section img {
        height: 50px !important;
    }

    .nav-section {
        padding: 0.5rem 0 !important;
    }

    .nav-links {
        gap: 1rem !important;
    }

    .nav-links a {
        font-size: 0.9rem !important;
        padding: 0.3rem 0.5rem !important;
    }

    .nav-buttons {
        gap: 0.5rem !important;
    }

    .nav-buttons .btn-primary {
        padding: 0.5rem 1rem !important;
        font-size: 0.85rem !important;
    }

    .main-website-link {
        padding: 0.4rem 0.8rem !important;
        font-size: 0.8rem !important;
    }

    .theme-toggle {
        padding: 0.4rem !important;
    }
}

/* Tablets and Small Screens (768px and below) */
@media (max-width: 768px) {
    .header-content {
        padding: 0.3rem 0 !important;
    }

    .logo-section {
        padding: 0.3rem 0 !important;
        gap: 0.8rem !important;
    }

    .logo-section img {
        height: 45px !important;
    }

    .nav-section {
        padding: 0.3rem 0 !important;
    }

    .nav-buttons {
        gap: 0.3rem !important;
        flex-direction: row !important;
        flex-wrap: nowrap !important;
    }

    .nav-buttons .btn-primary {
        padding: 0.4rem 0.8rem !important;
        font-size: 0.8rem !important;
        white-space: nowrap !important;
    }

    .main-website-link {
        padding: 0.3rem 0.6rem !important;
        font-size: 0.75rem !important;
        margin-left: 0.3rem !important;
    }

    .theme-toggle {
        padding: 0.3rem !important;
        margin-left: 0.3rem !important;
    }

    /* Mobile menu fixes */
    .mobile-menu {
        padding: 0.8rem !important;
    }

    .mobile-menu a {
        padding: 0.6rem 0.8rem !important;
        font-size: 0.9rem !important;
    }

    .mobile-menu .nav-buttons {
        margin-top: 0.5rem !important;
        gap: 0.5rem !important;
    }

    .mobile-menu .btn-primary {
        padding: 0.5rem 1rem !important;
        font-size: 0.85rem !important;
    }
}

/* Mobile Phones (480px and below) */
@media (max-width: 480px) {
    .logo-section {
        gap: 0.5rem !important;
    }

    .logo-section img {
        height: 40px !important;
    }

    .nav-buttons .btn-primary {
        padding: 0.35rem 0.7rem !important;
        font-size: 0.75rem !important;
    }

    .main-website-link {
        padding: 0.25rem 0.5rem !important;
        font-size: 0.7rem !important;
    }

    .main-website-link span {
        display: none !important;
    }

    .main-website-link i {
        margin-right: 0 !important;
    }

    .mobile-menu {
        padding: 0.6rem !important;
    }

    .mobile-menu a {
        padding: 0.5rem 0.6rem !important;
        font-size: 0.85rem !important;
    }
}


@media (max-width: 360px) {
    .logo-section img {
        height: 35px !important;
    }

    .nav-buttons .btn-primary {
        padding: 0.3rem 0.6rem !important;
        font-size: 0.7rem !important;
    }

    .main-website-link {
        padding: 0.2rem 0.4rem !important;
    }

    .menu-toggle {
        padding: 4px 8px !important;
        font-size: 0.8rem !important;
    }
}


@media (max-width: 1024px) {
    .menu-toggle {
        padding: 6px 12px !important;
        font-size: 0.9rem !important;
        gap: 6px !important;
    }

    .menu-toggle i {
        font-size: 1.1rem !important;
    }
}

@media (max-width: 768px) {
    .menu-toggle {
        padding: 5px 10px !important;
        font-size: 0.85rem !important;
    }

    .menu-toggle::after {
        content: "Menu" !important;
        font-size: 0.85rem !important;
    }
}


/* ===== REGISTRATION SECTION MOBILE FIXES ===== */
@media (max-width: 768px) {
    .registration-section {
        padding: 3rem 0;
        overflow-x: hidden;
    }

    .registration-grid {
        display: flex;
        flex-direction: column;
        gap: 2rem;
        margin-bottom: 2rem;
    }

    .registration-card {
        padding: 1.5rem;
        margin: 0;
        min-width: 0;
        width: 100%;
    }

    /* Fix table scrolling */
    .table-container {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        margin: 1rem -1.5rem;
        padding: 0 1.5rem;
        width: calc(100% + 3rem);
    }

    .table-container::-webkit-scrollbar {
        height: 6px;
    }

    .table-container::-webkit-scrollbar-thumb {
        background: var(--conference-accent);
        border-radius: 3px;
    }

    .table-container::-webkit-scrollbar-track {
        background: var(--conference-muted);
    }

    table {
        min-width: 600px;
        width: 100%;
        font-size: 0.9rem;
    }

    th,
    td {
        padding: 0.6rem 0.5rem;
        white-space: nowrap;
    }

    th:first-child,
    td:first-child {
        position: sticky;
        left: 0;
        background: var(--conference-primary);
        color: var(--conference-secondary);
        z-index: 1;
    }

    td:first-child {
        background: var(--conference-bg);
        color: var(--conference-fg);
        border-right: 2px solid var(--conference-border);
    }

    /* Fix process steps scrolling */
    .process-steps {
        gap: 1.5rem;
        max-height: none;
        overflow: visible;
    }

    .step {
        padding: 1.2rem;
        gap: 1rem;
        min-width: 0;
    }

    .step-number {
        width: 35px;
        height: 35px;
        font-size: 1rem;
        flex-shrink: 0;
    }

    .step-content {
        min-width: 0;
        overflow: hidden;
    }

    .step-content h4 {
        font-size: 1.1rem;
        margin-bottom: 0.5rem;
    }

    .step-content p {
        font-size: 0.9rem;
        line-height: 1.4;
    }

    /* Fix action grid */
    .action-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        max-width: 100%;
    }

    .action-card {
        padding: 1.5rem;
        margin: 0;
    }

    .action-icon {
        width: 60px;
        height: 60px;
        font-size: 1.5rem;
        margin-bottom: 1rem;
    }

    .image-placeholder {
        max-width: 150px;
        margin-bottom: 1rem;
    }

    .payment-details {
        margin-top: 1rem;
        padding: 1rem;
    }

    .payment-id {
        font-size: 1rem;
        word-break: break-all;
    }
}

@media (max-width: 480px) {
    .registration-section {
        padding: 2rem 0;
    }

    .registration-card {
        padding: 1.2rem;
    }

    .table-container {
        margin: 1rem -1.2rem;
        padding: 0 1.2rem;
        width: calc(100% + 2.4rem);
    }

    table {
        min-width: 550px;
        font-size: 0.85rem;
    }

    th,
    td {
        padding: 0.5rem 0.4rem;
    }

    .step {
        padding: 1rem;
        gap: 0.8rem;
    }

    .step-number {
        width: 30px;
        height: 30px;
        font-size: 0.9rem;
    }

    .step-content h4 {
        font-size: 1rem;
    }

    .step-content p {
        font-size: 0.85rem;
    }

    .action-card {
        padding: 1.2rem;
    }

    .action-icon {
        width: 50px;
        height: 50px;
        font-size: 1.3rem;
    }

    .image-placeholder {
        max-width: 120px;
    }

    /* Improve touch targets */
    .btn {
        padding: 1rem 1.5rem;
        min-height: 44px;
    }

    .nav-buttons .btn-primary {
        padding: 0.8rem 1.2rem;
        min-height: 40px;
    }
}

@media (max-width: 360px) {
    .registration-card {
        padding: 1rem;
    }

    .table-container {
        margin: 1rem -1rem;
        padding: 0 1rem;
        width: calc(100% + 2rem);
    }

    table {
        min-width: 500px;
        font-size: 0.8rem;
    }

    th,
    td {
        padding: 0.4rem 0.3rem;
    }

    .step {
        padding: 0.8rem;
    }

    .step-number {
        width: 28px;
        height: 28px;
        font-size: 0.8rem;
    }

    .action-card {
        padding: 1rem;
    }
}

/* Prevent horizontal scroll on body */
@media (max-width: 768px) {
    body {
        overflow-x: hidden;
        width: 100%;
    }

    .container {
        padding: 0 1rem;
    }
}

/* Smooth scrolling for tables */
.table-container {
    scroll-behavior: smooth;
}

/* iOS specific fixes */
@supports (-webkit-touch-callout: none) {
    .table-container {
        -webkit-overflow-scrolling: touch;
    }

    .registration-section {
        -webkit-transform: translateZ(0);
    }
}