/* ============================================
   Mobile Optimizations - iPhone & Small Screens
   ============================================ */

/* ============================================
   Tablet (max-width: 1024px)
   ============================================ */
@media (max-width: 1024px) {
    .section {
        padding: 4rem 0;
    }
    
    .section-header {
        margin-bottom: 3rem;
    }
    
    .about-grid {
        gap: 3rem;
    }
    
    /* Team Stats Grid */
    .team-stats-grid {
        grid-template-columns: 1fr !important;
        gap: 1.5rem !important;
    }
    
    .team-stat-card {
        padding: 1.5rem !important;
    }
    
    /* President Showcase */
    .president-showcase {
        flex-direction: column;
        text-align: center;
    }
    
    .president-showcase-img {
        margin-bottom: 2rem;
    }
}

/* ============================================
   Mobile Large (max-width: 768px)
   ============================================ */
@media (max-width: 768px) {
    /* Base Typography Adjustments */
    html {
        font-size: 15px;
    }
    
    .container {
        padding: 0 1.5rem;
    }
    
    /* Navigation Mobile */
    .navbar {
        padding: 0.75rem 0;
    }
    
    .nav-container {
        padding: 0 1rem;
    }
    
    .logo img {
        height: 40px;
        max-width: 180px;
    }
    
    .nav-toggle {
        display: flex;
        flex-direction: column;
        justify-content: center;
        padding: 0.5rem;
        z-index: 1001;
    }
    
    .nav-toggle span {
        width: 22px;
        height: 2px;
        margin-bottom: 4px;
        transition: all 0.3s ease;
    }
    
    .nav-toggle span:last-child {
        margin-bottom: 0;
    }
    
    .nav-toggle.active span:nth-child(1) {
        transform: rotate(45deg) translate(5px, 5px);
    }
    
    .nav-toggle.active span:nth-child(2) {
        opacity: 0;
    }
    
    .nav-toggle.active span:nth-child(3) {
        transform: rotate(-45deg) translate(5px, -5px);
    }
    
    .nav-menu {
        position: fixed;
        top: 0;
        right: -100%;
        width: 75%;
        max-width: 300px;
        height: 100vh;
        background: var(--primary);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 2rem;
        padding: 2rem;
        box-shadow: -5px 0 20px rgba(0, 0, 0, 0.3);
        transition: right 0.3s ease;
    }
    
    .nav-menu.active {
        right: 0;
    }
    
    .nav-link {
        font-size: 1rem;
        padding: 0.5rem 0;
    }
    
    /* Hero Mobile */
    .hero {
        min-height: 100vh;
        min-height: 100svh; /* Safe viewport height for mobile */
        padding: 0 1.5rem;
        padding-top: 80px;
    }
    
    .hero-content {
        max-width: 100%;
    }
    
    .hero-subtitle {
        font-size: 0.8rem;
        letter-spacing: 2px;
        margin-bottom: 1rem;
    }
    
    .hero-title {
        font-size: 1.75rem;
        margin-bottom: 1.5rem;
        line-height: 1.3;
    }
    
    .hero-description {
        font-size: 1rem;
        margin-bottom: 2rem;
        line-height: 1.5;
    }
    
    .hero-buttons {
        flex-direction: column;
        gap: 1rem;
        width: 100%;
    }
    
    .hero-buttons .btn {
        width: 100%;
        padding: 0.875rem 1.5rem;
        font-size: 0.85rem;
    }
    
    .hero-scroll {
        bottom: 1.5rem;
    }
    
    /* Sections Mobile */
    .section {
        padding: 3.5rem 0;
    }
    
    .section-header {
        margin-bottom: 2.5rem;
    }
    
    .section-tag {
        font-size: 0.75rem;
        letter-spacing: 1.5px;
    }
    
    .section-title {
        font-size: 1.5rem !important;
    }
    
    .section-subtitle {
        font-size: 0.95rem;
    }
    
    /* About Section Mobile */
    .about-lead {
        font-size: 1.15rem;
    }
    
    .about-stats {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        margin-top: 2rem;
        padding-top: 2rem;
    }
    
    .stat {
        text-align: center;
    }
    
    .stat-number {
        font-size: 2rem;
    }
    
    .stat-label {
        font-size: 0.75rem;
    }
    
    /* President Card Mobile */
    .president-card {
        max-width: 100%;
    }
    
    .president-image {
        height: 350px;
    }
    
    .president-info {
        position: relative;
        bottom: 0;
        right: 0;
        width: 100%;
        margin-top: -2rem;
    }
    
    /* Services Mobile */
    .services-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        max-width: 100%;
    }
    
    .service-card {
        padding: 2rem 1.5rem;
    }
    
    .service-icon {
        width: 50px;
        height: 50px;
        margin-bottom: 1.5rem;
    }
    
    .service-card h3 {
        font-size: 1.25rem;
    }
    
    .services-cta {
        margin-top: 2.5rem;
    }
    
    /* Team Section Mobile */
    .team-stats-grid {
        grid-template-columns: 1fr !important;
        gap: 1rem !important;
        margin: 2rem 0 !important;
    }
    
    .team-stat-card {
        padding: 1.25rem !important;
    }
    
    .team-stat-card .stat-number {
        font-size: 2rem;
    }
    
    .team-stat-card .stat-desc {
        font-size: 0.85rem;
    }
    
    .team-message {
        padding: 1.5rem;
        font-size: 0.95rem;
    }
    
    /* President Showcase Mobile */
    .president-showcase {
        flex-direction: column;
        text-align: center;
        gap: 1.5rem;
    }
    
    .president-showcase-img {
        width: 150px;
        height: 150px;
        margin: 0 auto;
    }
    
    .president-name {
        font-size: 1.5rem;
    }
    
    .president-quote {
        font-size: 0.95rem;
    }
    
    .president-credentials {
        flex-wrap: wrap;
        justify-content: center;
        gap: 0.5rem;
    }
    
    .credential-item {
        font-size: 0.8rem;
    }
    
    /* Startups Premium Section Mobile */
    .section-startups {
        padding: 3.5rem 0;
    }
    
    .startup-premium-grid {
        grid-template-columns: 1fr !important;
        gap: 1.5rem;
    }
    
    .premium-card {
        padding: 2rem 1.5rem;
    }
    
    .premium-card.featured {
        transform: none;
    }
    
    .premium-card.featured:hover {
        transform: translateY(-5px);
    }
    
    .premium-badge {
        font-size: 0.7rem;
        padding: 0.4rem 1rem;
    }
    
    .premium-number {
        font-size: 3rem;
    }
    
    .premium-card h3 {
        font-size: 1.35rem;
    }
    
    /* Trust Section Mobile */
    .startup-trust {
        flex-direction: column;
        padding: 2rem 1.5rem;
        gap: 1.5rem;
    }
    
    .trust-content {
        text-align: center;
    }
    
    .trust-content h3 {
        font-size: 1.25rem;
        margin-bottom: 1rem;
    }
    
    .trust-points {
        flex-direction: column;
        gap: 1.25rem;
    }
    
    .trust-icon {
        font-size: 1.5rem;
    }
    
    .trust-point span {
        font-size: 0.8rem;
    }
    
    .trust-cta {
        text-align: center;
        padding-left: 0;
        padding-top: 1.5rem;
        border-left: none;
        border-top: 1px solid rgba(0, 0, 0, 0.1);
        width: 100%;
    }
    
    .trust-phone {
        font-size: 1.5rem;
    }
    
    /* Process Section Mobile */
    .process-steps {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .process-step {
        padding: 1.5rem;
    }
    
    .step-number {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }
    
    .step-title {
        font-size: 1.1rem;
    }
    
    .features-grid {
        grid-template-columns: 1fr;
        gap: 1.25rem;
    }
    
    .feature-card {
        padding: 1.5rem;
    }
    
    .feature-card h4 {
        font-size: 1rem;
    }
    
    /* News Section Mobile */
    .news-grid {
        grid-template-columns: 1fr !important;
        gap: 1.5rem !important;
    }
    
    /* Contact Section Mobile */
    .contact-wrapper {
        grid-template-columns: 1fr;
        gap: 2.5rem;
    }
    
    .contact-info {
        text-align: center;
    }
    
    .contact-details {
        text-align: left;
    }
    
    .contact-item {
        margin-bottom: 1.5rem;
    }
    
    .contact-form-wrapper {
        padding: 2rem 1.5rem;
    }
    
    .form-group input,
    .form-group textarea,
    .form-group select {
        padding: 0.875rem;
        font-size: 16px; /* Prevents zoom on iOS */
    }
    
    /* Footer Mobile */
    .footer {
        padding: 3rem 0 1.5rem;
    }
    
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
        text-align: center;
    }
    
    .footer-logo {
        margin: 0 auto 1rem;
    }
    
    .footer-bottom {
        padding-top: 1.5rem;
    }
    
    .footer-bottom p {
        font-size: 0.8rem;
    }
    
    /* Back to Top Button */
    .back-to-top {
        right: 1rem;
        bottom: 1rem;
        width: 40px;
        height: 40px;
        font-size: 0.9rem;
    }
}

/* ============================================
   Mobile Small / iPhone SE (max-width: 480px)
   ============================================ */
@media (max-width: 480px) {
    html {
        font-size: 14px;
    }
    
    .container {
        padding: 0 1rem;
    }
    
    /* Hero Extra Small */
    .hero-title {
        font-size: 1.5rem;
    }
    
    .hero-subtitle {
        font-size: 0.7rem;
    }
    
    .hero-description {
        font-size: 0.9rem;
    }
    
    /* Sections Extra Small */
    .section {
        padding: 2.5rem 0;
    }
    
    .section-header {
        margin-bottom: 2rem;
    }
    
    .section-title {
        font-size: 1.35rem !important;
    }
    
    /* Stats */
    .stat-number {
        font-size: 1.75rem;
    }
    
    /* Cards */
    .service-card,
    .premium-card,
    .feature-card {
        padding: 1.5rem 1.25rem;
    }
    
    /* President Image */
    .president-image {
        height: 280px;
    }
    
    /* Contact Form */
    .contact-form-wrapper {
        padding: 1.5rem 1rem;
    }
    
    /* Trust Section */
    .trust-phone {
        font-size: 1.25rem;
    }
}

/* ============================================
   Safe Area Insets (iPhone X and newer)
   ============================================ */
@supports (padding: max(0px)) {
    .hero {
        padding-left: max(1.5rem, env(safe-area-inset-left));
        padding-right: max(1.5rem, env(safe-area-inset-right));
    }
    
    .navbar {
        padding-left: max(1rem, env(safe-area-inset-left));
        padding-right: max(1rem, env(safe-area-inset-right));
    }
    
    .footer {
        padding-bottom: max(1.5rem, env(safe-area-inset-bottom));
    }
}

/* ============================================
   Landscape Mode Adjustments
   ============================================ */
@media (max-height: 500px) and (orientation: landscape) {
    .hero {
        min-height: auto;
        padding-top: 100px;
        padding-bottom: 3rem;
    }
    
    .hero-title {
        font-size: 1.5rem;
        margin-bottom: 1rem;
    }
    
    .hero-description {
        margin-bottom: 1.5rem;
    }
    
    .hero-scroll {
        display: none;
    }
    
    .section {
        padding: 2.5rem 0;
    }
}

/* ============================================
   Touch Device Optimizations
   ============================================ */
@media (hover: none) and (pointer: coarse) {
    /* Remove hover effects on touch devices */
    .service-card:hover,
    .premium-card:hover,
    .feature-card:hover {
        transform: none;
    }
    
    .premium-card.featured:hover {
        transform: none;
    }
    
    /* Make buttons more touch-friendly */
    .btn {
        min-height: 44px;
        padding: 0.75rem 1.5rem;
    }
    
    .nav-link {
        min-height: 44px;
        display: flex;
        align-items: center;
    }
    
    /* Larger tap targets for links */
    .footer-links a,
    .contact-item a {
        padding: 0.5rem 0;
        display: inline-block;
    }
}

/* ============================================
   Print Styles (optional)
   ============================================ */
@media print {
    .navbar,
    .hero-scroll,
    .back-to-top,
    .nav-toggle {
        display: none !important;
    }
    
    .hero {
        min-height: auto;
        padding: 2rem;
    }
    
    .section {
        padding: 1.5rem 0;
        page-break-inside: avoid;
    }
}

