/* Responsive Design */

/* Large Tablets and Small Desktops */
@media (max-width: 1024px) {
    .container {
        padding: 0 30px;
    }
    
    .hero-content {
        grid-template-columns: 1fr;
        gap: 3rem;
        text-align: center;
    }
    
    .hero-image {
        height: 400px;
        margin: 0 auto;
    }
    
    .hero-title {
        font-size: 3rem;
    }
    
    .hero-buttons {
        justify-content: center;
    }
    
    .mission-vision {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .service-content {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .service-icon-large {
        margin: 0 auto 1.5rem;
    }
    
    .contact-content {
        grid-template-columns: 1fr;
        gap: 3rem;
    }
    
    .footer-content {
        grid-template-columns: 2fr 1fr 1fr;
        gap: 2rem;
    }
}

/* Tablets */
@media (max-width: 768px) {
    .container {
        padding: 0 20px;
    }
    
    h1 {
        font-size: 2.5rem;
    }
    
    h2 {
        font-size: 2rem;
    }
    
    h3 {
        font-size: 1.5rem;
    }
    
    .nav-menu {
        position: fixed;
        top: 0;
        right: -100%;
        width: 80%;
        max-width: 400px;
        height: 100vh;
        background: white;
        box-shadow: var(--shadow-xl);
        transition: right 0.3s ease;
        z-index: 999;
    }
    
    .nav-menu.active {
        right: 0;
    }
    
    .nav-menu ul {
        flex-direction: column;
        padding: 5rem 2rem;
        gap: 1rem;
    }
    
    .nav-link {
        display: block;
        padding: 1rem;
        border-bottom: 1px solid var(--border-color);
    }
    
    .nav-toggle {
        display: flex;
        z-index: 1001;
    }
    
    .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(7px, -6px);
    }
    
    .hero {
        padding: 6rem 0 3rem;
    }
    
    .hero-title {
        font-size: 2.5rem;
    }
    
    .hero-subtitle {
        font-size: 1.125rem;
    }
    
    .hero-buttons {
        flex-direction: column;
        align-items: center;
        gap: 1rem;
    }
    
    .hero-buttons .btn {
        width: 250px;
        justify-content: center;
    }
    
    .hero-stats {
        grid-template-columns: repeat(3, 1fr);
        gap: 1rem;
    }
    
    .stat-item h3 {
        font-size: 2rem;
    }
    
    .hero-image {
        height: 300px;
    }
    
    .floating-card {
        width: 80px;
        height: 80px;
        font-size: 1.5rem;
    }
    
    .services-grid {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
        gap: 1.5rem;
    }
    
    .service-card {
        padding: 1.5rem;
    }
    
    .service-icon {
        width: 60px;
        height: 60px;
        font-size: 1.5rem;
    }
    
    .values-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }
    
    .value-item {
        padding: 1rem;
    }
    
    .value-item i {
        font-size: 1.5rem;
    }
    
    .courses-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .portfolio-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .contact-info {
        gap: 1.5rem;
    }
    
    .contact-item {
        gap: 1rem;
    }
    
    .contact-icon {
        width: 50px;
        height: 50px;
        font-size: 1.25rem;
    }
    
    .footer-content {
        grid-template-columns: 1fr 1fr;
        gap: 2rem;
    }
    
    .footer-section:last-child {
        grid-column: span 2;
    }
}

/* Mobile Phones */
@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }
    
    h1 {
        font-size: 2rem;
    }
    
    h2 {
        font-size: 1.75rem;
    }
    
    h3 {
        font-size: 1.375rem;
    }
    
    .hero {
        padding: 5rem 0 2rem;
    }
    
    .hero-title {
        font-size: 2rem;
        line-height: 1.3;
    }
    
    .hero-subtitle {
        font-size: 1rem;
    }
    
    .hero-buttons .btn {
        width: 200px;
        padding: 0.75rem 1rem;
        font-size: 0.875rem;
    }
    
    .hero-stats {
        grid-template-columns: 1fr;
        gap: 1rem;
        text-align: center;
    }
    
    .hero-image {
        height: 250px;
    }
    
    .floating-card {
        width: 60px;
        height: 60px;
        font-size: 1.25rem;
    }
    
    .card-1 {
        top: 10%;
        left: 20%;
    }
    
    .card-2 {
        top: 40%;
        right: 10%;
    }
    
    .card-3 {
        bottom: 10%;
        left: 40%;
    }
    
    .section-header {
        margin-bottom: 2rem;
    }
    
    .section-header h2 {
        font-size: 1.75rem;
    }
    
    .section-header p {
        font-size: 1rem;
    }
    
    .services-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .service-card {
        padding: 1.25rem;
    }
    
    .service-icon {
        width: 50px;
        height: 50px;
        font-size: 1.25rem;
    }
    
    .mission, .vision {
        padding: 1.5rem;
    }
    
    .values-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .service-item {
        margin-bottom: 2rem;
    }
    
    .service-content {
        padding: 1.5rem;
    }
    
    .service-icon-large {
        width: 80px;
        height: 80px;
        font-size: 2rem;
    }
    
    .course-card {
        margin-bottom: 1.5rem;
    }
    
    .course-header {
        padding: 0.75rem 1rem;
    }
    
    .course-card h3 {
        padding: 1rem;
        font-size: 1.25rem;
    }
    
    .course-card p {
        padding: 0 1rem;
        font-size: 0.875rem;
    }
    
    .course-details {
        padding: 0.75rem 1rem;
        font-size: 0.75rem;
    }
    
    .course-topics {
        padding: 0 1rem;
        font-size: 0.75rem;
    }
    
    .enroll-btn {
        margin: 0 1rem 1rem;
        width: calc(100% - 2rem);
        padding: 0.75rem 1rem;
        font-size: 0.875rem;
    }
    
    .portfolio-item {
        margin-bottom: 1.5rem;
    }
    
    .portfolio-image {
        height: 200px;
    }
    
    .portfolio-info {
        padding: 1.5rem;
    }
    
    .portfolio-info h3 {
        font-size: 1.25rem;
    }
    
    .portfolio-info p {
        font-size: 0.875rem;
    }
    
    .portfolio-tech span {
        font-size: 0.625rem;
        padding: 0.1875rem 0.5rem;
    }
    
    .contact-info {
        gap: 1rem;
    }
    
    .contact-item {
        flex-direction: column;
        text-align: center;
        gap: 0.75rem;
    }
    
    .contact-icon {
        margin: 0 auto;
    }
    
    .contact-form {
        padding: 1.5rem;
    }
    
    .form-group input,
    .form-group select,
    .form-group textarea {
        padding: 0.75rem;
        font-size: 0.875rem;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        gap: 2rem;
        text-align: center;
    }
    
    .footer-section:last-child {
        grid-column: span 1;
    }
    
    .footer-brand {
        justify-content: center;
    }
    
    .social-links {
        justify-content: center;
    }
    
    .newsletter-form {
        flex-direction: column;
    }
    
    .newsletter-form button {
        width: 100%;
    }
}

/* Extra Small Mobile Phones */
@media (max-width: 320px) {
    .container {
        padding: 0 10px;
    }
    
    h1 {
        font-size: 1.75rem;
    }
    
    h2 {
        font-size: 1.5rem;
    }
    
    h3 {
        font-size: 1.25rem;
    }
    
    .hero-title {
        font-size: 1.75rem;
    }
    
    .hero-subtitle {
        font-size: 0.875rem;
    }
    
    .hero-buttons .btn {
        width: 180px;
        font-size: 0.75rem;
        padding: 0.625rem 0.75rem;
    }
    
    .service-card {
        padding: 1rem;
    }
    
    .mission, .vision {
        padding: 1rem;
    }
    
    .service-content {
        padding: 1rem;
    }
    
    .course-header {
        padding: 0.5rem 0.75rem;
        flex-direction: column;
        gap: 0.5rem;
        text-align: center;
    }
    
    .course-card h3 {
        padding: 0.75rem;
        font-size: 1.125rem;
    }
    
    .contact-form {
        padding: 1rem;
    }
    
    .form-group input,
    .form-group select,
    .form-group textarea {
        padding: 0.625rem;
        font-size: 0.75rem;
    }
}

/* Landscape Orientation for Mobile */
@media (max-width: 768px) and (orientation: landscape) {
    .hero {
        padding: 4rem 0 2rem;
    }
    
    .hero-content {
        grid-template-columns: 1fr 1fr;
        gap: 2rem;
    }
    
    .hero-image {
        height: 200px;
    }
    
    .hero-stats {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .floating-card {
        width: 50px;
        height: 50px;
        font-size: 1rem;
    }
}

/* High DPI/Retina Displays */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .floating-card {
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    }
    
    .service-card,
    .course-card,
    .portfolio-item {
        box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    }
}

/* Print Styles */
@media print {
    .navbar,
    .nav-toggle,
    .hero-buttons,
    .floating-card,
    .footer,
    .btn {
        display: none !important;
    }
    
    .hero {
        padding: 2rem 0;
        background: none;
    }
    
    .hero-content {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    body {
        font-size: 12pt;
        line-height: 1.4;
        color: #000;
        background: #fff;
    }
    
    h1, h2, h3 {
        color: #000;
        page-break-after: avoid;
    }
    
    .service-card,
    .course-card,
    .portfolio-item {
        break-inside: avoid;
        page-break-inside: avoid;
        margin-bottom: 1rem;
    }
}

/* Accessibility - Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    .floating-card {
        animation: none;
    }
    
    .hero-title,
    .hero-subtitle,
    .hero-stats {
        animation: none;
    }
}

/* Dark Mode Support (Future Enhancement) */
@media (prefers-color-scheme: dark) {
    /* This can be expanded for full dark mode support */
    :root {
        --text-dark: #f9fafb;
        --text-light: #d1d5db;
        --text-lighter: #9ca3af;
        --bg-light: #1f2937;
        --bg-white: #111827;
        --border-color: #374151;
    }
    
    .navbar {
        background: rgba(17, 24, 39, 0.95);
    }
    
    .hero {
        background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
    }
    
    .service-card,
    .course-card,
    .portfolio-item {
        background: var(--bg-light);
        border-color: var(--border-color);
    }
    
    .mission,
    .vision,
    .value-item,
    .contact-form {
        background: var(--bg-light);
    }
}

/* Large Screens (4K and above) */
@media (min-width: 1920px) {
    .container {
        max-width: 1400px;
    }
    
    h1 {
        font-size: 4rem;
    }
    
    h2 {
        font-size: 3rem;
    }
    
    h3 {
        font-size: 2.25rem;
    }
    
    .hero-title {
        font-size: 4.5rem;
    }
    
    .hero-subtitle {
        font-size: 1.5rem;
    }
    
    .hero-content {
        gap: 5rem;
    }
    
    .hero-image {
        height: 600px;
    }
    
    .floating-card {
        width: 150px;
        height: 150px;
        font-size: 2.5rem;
    }
    
    .services-grid {
        grid-template-columns: repeat(4, 1fr);
    }
    
    .courses-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .portfolio-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* Ultra-wide Screens */
@media (min-width: 2560px) {
    .container {
        max-width: 1600px;
    }
    
    .hero-title {
        font-size: 5rem;
    }
    
    .hero-subtitle {
        font-size: 1.75rem;
    }
    
    .hero-image {
        height: 700px;
    }
    
    .floating-card {
        width: 180px;
        height: 180px;
        font-size: 3rem;
    }
}

/* Cookie Consent Responsive */
@media (max-width: 768px) {
    .cookie-content {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
        padding: 1rem;
    }
    
    .cookie-buttons {
        width: 100%;
        justify-content: center;
    }
    
    .cookie-buttons .btn {
        flex: 1;
        max-width: 150px;
    }
}

@media (max-width: 480px) {
    .cookie-content {
        padding: 1rem 0.75rem;
    }
    
    .cookie-icon {
        font-size: 1.5rem;
    }
    
    .cookie-text h3 {
        font-size: 1.125rem;
    }
    
    .cookie-text p {
        font-size: 0.75rem;
    }
    
    .cookie-buttons {
        flex-direction: column;
        width: 100%;
    }
    
    .cookie-buttons .btn {
        width: 100%;
        max-width: none;
    }
}

/* Touch Device Optimizations */
@media (hover: none) and (pointer: coarse) {
    .btn {
        min-height: 44px;
        min-width: 44px;
    }
    
    .nav-link {
        padding: 1rem;
    }
    
    .service-card:hover,
    .course-card:hover,
    .portfolio-item:hover {
        transform: none;
    }
    
    .portfolio-overlay {
        opacity: 1;
        background: rgba(0, 0, 0, 0.6);
    }
    
    .portfolio-info {
        padding: 1rem;
    }
    
    .portfolio-info h3 {
        font-size: 1.125rem;
    }
    
    .portfolio-info p {
        font-size: 0.875rem;
    }
}

/* Focus Visible for Better Accessibility */
@media (focus-visible) {
    .btn:focus-visible,
    .nav-link:focus-visible,
    .social-links a:focus-visible {
        outline: 2px solid var(--primary-color);
        outline-offset: 2px;
    }
    
    .form-group input:focus-visible,
    .form-group select:focus-visible,
    .form-group textarea:focus-visible {
        outline: 2px solid var(--primary-color);
        outline-offset: 2px;
    }
}
