/* OHA Infotech - Responsive Design */
/* Mobile and Tablet Responsive Styles */

/* Responsive adjustments for floating cards */
@media (max-width: 768px) {
    .floating-cards {
        width: 320px;
        height: 320px;
    }
    
    .floating-cards::before {
        width: 280px;
        height: 280px;
        margin-top: -140px;
        margin-left: -140px;
        opacity: 0;
        animation: none;
    }
    
    .floating-cards::after {
        width: 250px;
        height: 250px;
        margin-top: -125px;
        margin-left: -125px;
        opacity: 0;
        animation: none;
    }
    
    .tech-card {
        width: 60px;
        height: 60px;
        padding: 0.5rem;
    }
    
    /* Mobile circular arrangement with 130px radius */
    .tech-card:nth-child(1) {
        top: calc(50% - 130px - 30px);
        left: calc(50% - 30px);
    }
    
    .tech-card:nth-child(2) {
        top: calc(50% - 112.58px - 30px);
        left: calc(50% + 65px - 30px);
    }
    
    .tech-card:nth-child(3) {
        top: calc(50% - 65px - 30px);
        left: calc(50% + 112.58px - 30px);
    }
    
    .tech-card:nth-child(4) {
        top: calc(50% - 30px);
        left: calc(50% + 130px - 30px);
    }
    
    .tech-card:nth-child(5) {
        top: calc(50% + 65px - 30px);
        left: calc(50% + 112.58px - 30px);
    }
    
    .tech-card:nth-child(6) {
        top: calc(50% + 112.58px - 30px);
        left: calc(50% + 65px - 30px);
    }
    
    .tech-card:nth-child(7) {
        top: calc(50% + 130px - 30px);
        left: calc(50% - 30px);
    }
    
    .tech-card:nth-child(8) {
        top: calc(50% + 112.58px - 30px);
        left: calc(50% - 65px - 30px);
    }
    
    .tech-card:nth-child(9) {
        top: calc(50% + 65px - 30px);
        left: calc(50% - 112.58px - 30px);
    }
    
    .tech-card:nth-child(10) {
        top: calc(50% - 30px);
        left: calc(50% - 130px - 30px);
    }
    
    .tech-card:nth-child(11) {
        top: calc(50% - 65px - 30px);
        left: calc(50% - 112.58px - 30px);
    }
    
    .tech-card:nth-child(12) {
        top: calc(50% - 112.58px - 30px);
        left: calc(50% - 65px - 30px);
    }
    
    .tech-card i {
        font-size: 1.3rem;
    }
    
    .tech-card span {
        font-size: 0.6rem;
    }
    
    /* Reduce animation intensity on mobile */
    @keyframes circularGlow {
        0%, 90%, 100% { 
            opacity: 0.7;
            transform: scale(1);
            background: rgba(255, 255, 255, 0.08);
            border-color: rgba(255, 255, 255, 0.15);
            box-shadow: none;
        }
        
        8.33% { 
            opacity: 1;
            transform: scale(1.1);
            background: linear-gradient(135deg, 
                rgba(0, 120, 212, 0.25) 0%, 
                rgba(0, 120, 212, 0.15) 100%);
            border-color: var(--primary-color);
            box-shadow: 
                0 0 15px rgba(0, 120, 212, 0.5),
                0 0 30px rgba(0, 120, 212, 0.2);
        }
    }
}

/* Tablet and Mobile Landscape */
@media (max-width: 1024px) {
    .container {
        padding: 0 2rem;
    }
    
    .hero-content h1 {
        font-size: clamp(2.8rem, 6vw, 3.5rem);
    }
    
    .glass-container {
        padding: 2rem;
    }
    
    .services-grid,
    .training-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }
}

/* Mobile and Small Tablets */
@media (max-width: 768px) {
    :root {
        --spacing-xs: 0.25rem;
        --spacing-sm: 0.75rem;
        --spacing-md: 1rem;
        --spacing-lg: 1.5rem;
        --spacing-xl: 2rem;
    }
    
    body {
        font-size: 14px;
        background-attachment: local; /* Better mobile performance */
    }
    
    .nav-menu {
        position: fixed;
        left: -100%;
        top: 70px;
        flex-direction: column;
        background: var(--bg-glass);
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
        border: 1px solid var(--border-color);
        width: 100%;
        text-align: center;
        transition: var(--transition);
        box-shadow: var(--shadow-elevated);
        padding: 2rem 0;
        z-index: 1000;
    }

    .nav-menu.active {
        left: 0;
    }
    
    .nav-link {
        color: var(--text-primary) !important;
        font-weight: 500;
        font-size: 1.1rem;
        padding: 1rem 2rem;
        margin: 0.5rem 0;
        border-radius: var(--border-radius);
        transition: var(--transition);
    }
    
    .nav-link:hover {
        background: var(--bg-glass-hover);
        transform: translateX(5px);
    }

    .hamburger {
        display: flex;
        background: var(--bg-glass);
        backdrop-filter: blur(10px);
        -webkit-backdrop-filter: blur(10px);
        border: 1px solid var(--border-color);
        border-radius: var(--border-radius);
        padding: 0.5rem;
        box-shadow: var(--shadow-light);
    }

    .hamburger.active .bar:nth-child(2) {
        opacity: 0;
    }

    .hamburger.active .bar:nth-child(1) {
        transform: translateY(8px) rotate(45deg);
    }

    .hamburger.active .bar:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
    }

    /* Mobile Navigation Auth Styles */
    .nav-auth {
        position: fixed;
        top: 70px;
        left: -100%;
        width: 100%;
        background: var(--bg-glass);
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
        border: 1px solid var(--border-color);
        padding: 1rem 2rem;
        transition: var(--transition);
        z-index: 999;
    }
    
    .nav-auth.active {
        left: 0;
    }
    
    .nav-auth-buttons,
    .nav-user-menu {
        flex-direction: column;
        gap: 1rem;
        align-items: center;
        width: 100%;
    }
    
    .auth-btn,
    .user-link {
        width: 100%;
        max-width: 280px;
        justify-content: center;
        padding: 0.75rem 1.5rem;
        font-size: 1rem;
    }
    
    .logout-form {
        width: 100%;
        max-width: 280px;
    }
    
    .logout-btn {
        width: 100%;
        max-width: 280px;
        height: auto;
        padding: 0.75rem 1.5rem;
        font-size: 1rem;
        justify-content: center;
        gap: 0.5rem;
    }
    
    .logout-btn::after {
        content: ' Logout';
    }

    .hero-container {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 2rem;
        padding: 2rem 0;
    }

    .hero-content h1 {
        font-size: clamp(2.2rem, 8vw, 2.8rem);
        margin-bottom: 1rem;
    }
    
    .hero-content p {
        font-size: clamp(1rem, 3vw, 1.1rem);
        margin-bottom: 2rem;
    }

    /* Hero Auth Section Styles */
    .hero-auth-section {
        margin-top: 1.5rem;
        padding-top: 1.5rem;
    }
    
    .auth-buttons {
        flex-direction: column;
        align-items: center;
        gap: 1rem;
    }
    
    .auth-buttons .btn {
        width: 100%;
        max-width: 280px;
    }

    .floating-cards {
        width: 220px;
        height: 220px;
        margin: 0 auto;
    }

    .glass-container {
        padding: 1.5rem;
        margin: 1rem 0;
    }

    .about-content,
    .contact-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .container {
        padding: 0 1rem;
    }

    .hero {
        padding: 5rem 0 2rem;
        min-height: auto;
    }

    section {
        padding: 2.5rem 0;
    }

    .services-grid,
    .training-grid,
    .blog-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .service-card,
    .course-card,
    .blog-card {
        padding: 1.5rem;
        margin-bottom: 1rem;
    }
    
    .service-card h3,
    .course-card h3 {
        font-size: 1.3rem;
    }

    .newsletter-input-group {
        flex-direction: column;
        gap: 0.75rem;
    }

    .newsletter-input-group button {
        border-radius: var(--border-radius);
        padding: 0.75rem 1.5rem;
        font-size: 1rem;
    }
    
    .btn {
        padding: 0.75rem 1.5rem;
        font-size: 0.95rem;
        min-height: 44px; /* Better touch target */
    }
    
    .hero-buttons {
        flex-direction: column;
        gap: 1rem;
        align-items: center;
    }
    
    .hero-buttons .btn {
        width: 100%;
        max-width: 280px;
    }
    
    /* Improved form styling for mobile */
    .contact-form {
        padding: 1.5rem;
    }
    
    .form-group input,
    .form-group textarea,
    .form-group select {
        font-size: 16px; /* Prevents zoom on iOS */
        padding: 0.875rem 1rem;
        border-radius: var(--border-radius);
    }
    
    .form-group textarea {
        min-height: 120px;
    }

    /* Training Filters */
    .training-filters {
        flex-direction: column;
        align-items: center;
        gap: 0.75rem;
    }

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

    .stat-number {
        font-size: 1.8rem;
    }
    
    .stat-label {
        font-size: 0.8rem;
    }

    /* Responsive logo adjustments */
    .logo-icon {
        width: 42px;
        height: 42px;
    }
    
    .logo-company {
        font-size: 1.2rem;
    }
    
    .logo-tagline {
        font-size: 0.65rem;
    }
    
    .oha-logo {
        gap: 0.5rem;
    }

    /* Responsive WhatsApp button */
    .whatsapp-float {
        width: 50px;
        height: 50px;
        bottom: 20px;
        right: 20px;
        font-size: 24px;
    }
}

/* Small Mobile Devices */
@media (max-width: 480px) {
    .container {
        padding: 0 0.75rem;
    }
    
    .hero-content h1 {
        font-size: clamp(1.8rem, 10vw, 2.2rem);
    }
    
    .hero-content p {
        font-size: 1rem;
    }

    .glass-container {
        padding: 1rem;
        margin: 0.75rem 0;
    }

    .stat-number {
        font-size: 1.8rem;
    }
    
    .stat-label {
        font-size: 0.8rem;
    }
    
    .service-card,
    .course-card {
        padding: 1rem;
    }
    
    .floating-cards {
        width: 180px;
        height: 180px;
    }
    
    .newsletter-input {
        font-size: 16px; /* Prevents zoom on iOS */
    }
    
    /* Touch-friendly spacing */
    .nav-link {
        padding: 1.25rem 2rem;
        margin: 0.75rem 0;
    }
    
    /* Better modal sizing on small screens */
    .modal-content {
        margin: 1rem;
        padding: 1rem;
        max-height: 90vh;
        overflow-y: auto;
    }

    .logo-text {
        display: none; /* Hide text on very small screens, show only icon */
    }
    
    .logo-icon {
        width: 40px;
        height: 40px;
    }

    .whatsapp-float {
        width: 45px;
        height: 45px;
        font-size: 20px;
    }
}

@media (max-width: 360px) {
    .hero-buttons .btn {
        font-size: 0.9rem;
        padding: 0.7rem 1.2rem;
    }
    
    .glass-container {
        padding: 0.75rem;
    }
    
    .service-card h3,
    .course-card h3 {
        font-size: 1.1rem;
    }
    
    .floating-cards {
        width: 150px;
        height: 150px;
    }
}