/* ===================================
   ROBOTICS CLUB - RESPONSIVE STYLES
   Media queries for all breakpoints
   =================================== */

/* ===================================
   TABLET (768px and below)
   =================================== */
@media (max-width: 768px) {

    /* Typography adjustments */
    h1 {
        font-size: 2.5rem;
    }

    h2 {
        font-size: 2rem;
    }

    h3 {
        font-size: 1.5rem;
    }

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

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

    /* Navigation */
    .navbar {
        padding: 1rem 1.5rem;
    }

    .nav-container {
        position: relative;
        justify-content: center;
        /* Center horizontally */
    }

    .logo {
        position: absolute;
        left: 50%;
        transform: translateX(-50%);
        font-size: 1.2rem;
        white-space: nowrap;
        z-index: 10;
    }

    .mobile-menu-toggle {
        display: flex;
        margin-left: auto;
        position: relative;
        z-index: 11;
    }

    .nav-menu {
        position: fixed;
        top: 70px;
        left: -100%;
        width: 100%;
        height: calc(100vh - 70px);
        background: rgba(26, 26, 46, 0.98);
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 2rem;
        transition: left 0.3s ease;
    }

    .nav-menu.active {
        left: 0;
    }

    .nav-menu li a {
        font-size: 1.5rem;
    }

    /* Grid layouts */
    .grid-2,
    .grid-3,
    .grid-4 {
        grid-template-columns: repeat(2, 1fr);
    }

    /* Container padding */
    .container {
        padding: 0 1.5rem;
    }

    .section {
        padding: 60px 0;
    }

    /* Hero section */
    .hero {
        min-height: 80vh;
    }

    .hero-content {
        padding: 1.5rem;
    }

    .hero-buttons {
        flex-direction: column;
        align-items: stretch;
    }

    .hero-buttons .btn {
        width: 100%;
    }

    /* Timeline */
    .timeline::before {
        left: 40px;
    }

    .timeline-item {
        flex-direction: column !important;
        align-items: flex-start;
        padding-left: 0;
        /* Reset padding, handle via margins/relative positioning if needed, or keep padding-left for whole item */
        padding-left: 70px;
    }

    .timeline-content {
        width: 100%;
        margin-top: 3.5rem;
    }

    .timeline-year {
        left: 40px;
        top: 0;
        transform: translateX(-50%);
    }

    /* Stats container */
    .stats-container {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }

    .stat-item {
        padding: 1.5rem;
    }

    .stat-number {
        font-size: 2.5rem;
    }

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

/* ===================================
   MOBILE (480px and below)
   =================================== */
@media (max-width: 480px) {

    /* Typography */
    h1 {
        font-size: 2rem;
    }

    h2 {
        font-size: 1.75rem;
    }

    h3 {
        font-size: 1.25rem;
    }

    .hero-title {
        font-size: 2rem;
        letter-spacing: 1px;
    }

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

    .hero-description {
        font-size: 0.95rem;
    }

    /* Navigation inherited from 768px */


    /* Grid layouts - single column */
    .grid-2,
    .grid-3,
    .grid-4 {
        grid-template-columns: 1fr;
    }

    /* Container */
    .container {
        padding: 0 1rem;
    }

    .section {
        padding: 40px 0;
    }

    /* Buttons */
    .btn {
        padding: 0.75rem 1.5rem;
        font-size: 0.95rem;
    }

    /* Cards */
    .card {
        padding: 1.25rem;
    }

    .card-img {
        height: 180px;
    }

    /* Stats */
    .stats-container {
        grid-template-columns: 1fr;
    }

    .stat-number {
        font-size: 2rem;
    }

    /* Filter buttons */
    .filter-container {
        gap: 0.5rem;
    }

    .filter-btn {
        padding: 0.5rem 1rem;
        font-size: 0.875rem;
    }

    /* Forms */
    .form-input,
    .form-textarea,
    .form-select {
        padding: 0.75rem;
        font-size: 0.95rem;
    }

    /* Hero section mobile fixes */
    .hero {
        min-height: 100vh;
        padding-top: 80px;
    }

    /* Show flying robots on mobile but resize them */
    .flying-robot {
        display: block;
        width: 80px;
    }

    .robot-left {
        top: 100px;
        left: 10px;
    }

    .robot-right {
        top: 110px;
        right: 10px;
    }

    /* Center logo at top on mobile */
    .hero-logo {
        position: absolute;
        top: 90px;
        left: 50%;
        transform: translateX(-50%);
        width: 80px;
        z-index: 10;
    }

    /* Adjust hero title group positioning */
    .hero-title-group {
        top: 30%;
        transform: translate(-50%, -50%);
        padding: 0 1rem;
    }

    .hero-title {
        font-size: 1.8rem;
        letter-spacing: 2px;
        margin-bottom: 0.5rem;
    }

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

    /* Scale down background octopus */
    .background-octopus {
        width: 250px;
        height: 250px;
        opacity: 0.8;
    }

    /* Fix hero content positioning */
    .hero-content {
        position: absolute;
        top: 55%;
        left: 50%;
        transform: translate(-50%, 0);
        width: 100%;
        max-width: 100%;
        padding: 1rem;
        margin-top: 2rem;
    }

    .hero-description {
        font-size: 0.9rem;
        line-height: 1.6;
        margin-bottom: 1.5rem;
        text-align: center;
    }

    .hero-buttons {
        width: 100%;
        padding: 0 1rem;
    }

    .hero-buttons .btn {
        width: 100%;
        max-width: 280px;
    }

    /* Footer */
    .footer {
        padding: 2rem 1rem 1rem;
    }

    .social-links a {
        width: 35px;
        height: 35px;
        font-size: 1rem;
    }

    /* ===================================
       PERFORMANCE OPTIMIZATIONS
       =================================== */

    /* Disable heavy blur effects */
    .navbar {
        backdrop-filter: none;
        background: rgba(26, 26, 46, 0.98);
        /* Solid background instead */
    }

    /* Simplify text shadows */
    h1,
    h2,
    h3,
    h4,
    .hero-title,
    .section-title {
        animation: none !important;
        /* Stop pulsing animation */
        text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
        /* Simple static shadow */
    }

    .section-title::after {
        box-shadow: none;
    }

    /* Reduce card shadows */
    .card,
    .card2,
    .glow-card {
        box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
        transition: none;
        /* Disable hover transitions on touch */
    }

    .card:hover,
    .card2:hover,
    .glow-card:hover {
        transform: none;
        box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
    }

    /* Disable expensive SVG filters */
    .octopus-eye-ring {
        filter: none !important;
        /* Remove Gaussian blur */
    }

    /* Remove heavy particle/background animations if needed via CSS */
    .bg-robot,
    .bg-trophy,
    .bg-newspaper {
        display: none;
        /* Hide background elements to save resources */
    }
}

/* ===================================
   LARGE DESKTOP (1400px and above)
   =================================== */
@media (min-width: 1400px) {
    .container {
        max-width: 1400px;
    }

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

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

/* ===================================
   LANDSCAPE ORIENTATION (Mobile)
   =================================== */
@media (max-height: 500px) and (orientation: landscape) {
    .hero {
        min-height: auto;
        padding: 100px 0 50px;
    }

    .nav-menu {
        flex-direction: row;
        flex-wrap: wrap;
        height: auto;
        padding: 2rem;
    }
}

/* ===================================
   PRINT STYLES
   =================================== */
@media print {

    .navbar,
    .mobile-menu-toggle,
    .footer,
    .btn {
        display: none;
    }

    body {
        background: white;
        color: black;
    }

    .hero::before {
        display: none;
    }
}