/* Responsive Styles for SolarPower Grid */

/* Tablet Styles */
@media screen and (max-width: 1024px) {
    .container {
        padding: 0 15px;
    }

    /* Hero Section */
    .hero-content {
        grid-template-columns: 1fr;
        gap: 2rem;
        text-align: center;
    }

    .hero-text h1 {
        font-size: 2.5rem;
    }

    /* About Section */
    .about-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

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

    /* Services Grid */
    .services-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }

    /* Courses Grid */
    .courses-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }

    /* Newsletter */
    .newsletter-content {
        grid-template-columns: 1fr;
        gap: 2rem;
        text-align: center;
    }

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

    /* Footer */
    .footer-content {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }

    /* Cookie Banner */
    .cookie-content {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }

    .cookie-buttons {
        justify-content: center;
    }
}

/* Mobile Styles */
@media screen and (max-width: 768px) {
    /* Typography */
    h1 {
        font-size: 2rem;
    }

    h2 {
        font-size: 1.75rem;
    }

    h3 {
        font-size: 1.25rem;
    }

    /* Navigation */
    .nav-menu {
        position: fixed;
        left: -100%;
        top: 70px;
        flex-direction: column;
        background-color: white;
        width: 100%;
        text-align: center;
        transition: 0.3s;
        box-shadow: 0 10px 27px rgba(0, 0, 0, 0.05);
        z-index: 999;
    }

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

    .nav-list {
        flex-direction: column;
        gap: 0;
    }

    .nav-list li {
        padding: 1rem 0;
        border-bottom: 1px solid #f0f0f0;
    }

    .nav-toggle {
        display: flex;
    }

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

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

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

    /* Hero Section */
    .hero {
        padding: 60px 0;
        min-height: 500px;
    }

    .hero-text h1 {
        font-size: 2rem;
    }

    .hero-text p {
        font-size: 1rem;
    }

    .hero-buttons {
        flex-direction: column;
        align-items: center;
        gap: 0.75rem;
    }

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

    /* Sections */
    section {
        padding: 60px 0;
    }

    .section-header {
        margin-bottom: 2rem;
    }

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

    /* Services Grid */
    .services-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .service-card {
        padding: 1.5rem;
    }

    /* Courses Grid */
    .courses-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .course-card {
        margin: 0 auto;
        max-width: 400px;
    }

    .course-meta {
        flex-direction: column;
        gap: 0.5rem;
    }

    /* Testimonials */
    .testimonials-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .testimonial-card {
        padding: 1.5rem;
    }

    /* Newsletter */
    .newsletter-form-container {
        padding: 1.5rem;
    }

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

    .form-group .btn {
        width: 100%;
        justify-content: center;
    }

    /* Contact */
    .contact-item {
        flex-direction: column;
        text-align: center;
        gap: 0.5rem;
    }

    .contact-form-container {
        padding: 1.5rem;
    }

    .form-row {
        grid-template-columns: 1fr;
        gap: 0;
    }

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

    .footer-content {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        text-align: center;
    }

    .social-links {
        justify-content: center;
    }

    /* Cookie Banner */
    .cookie-banner {
        padding: 1rem 0;
    }

    .cookie-content {
        padding: 0 15px;
    }

    .cookie-text h3 {
        font-size: 1.1rem;
    }

    .cookie-text p {
        font-size: 0.9rem;
    }

    .cookie-buttons {
        flex-direction: column;
        width: 100%;
    }

    .cookie-buttons .btn {
        width: 100%;
        justify-content: center;
        padding: 10px 16px;
        font-size: 0.9rem;
    }

    /* Cookie Modal */
    .cookie-modal-content {
        width: 95%;
        margin: 20px;
        max-height: 85vh;
    }

    .cookie-modal-header {
        padding: 1rem;
    }

    .cookie-modal-header h2 {
        font-size: 1.25rem;
    }

    .cookie-modal-body {
        padding: 1rem;
    }

    .cookie-modal-footer {
        padding: 1rem;
    }

    .cookie-toggle label {
        font-size: 0.9rem;
        gap: 0.75rem;
    }

    /* Legal Pages */
    .legal-content {
        padding: 1.5rem;
        margin: 1rem;
    }

    .legal-section h2 {
        font-size: 1.5rem;
    }

    .legal-section h3 {
        font-size: 1.2rem;
    }

    .cookie-table {
        font-size: 0.9rem;
    }

    .cookie-table th,
    .cookie-table td {
        padding: 8px;
    }

    /* Thank You Page */
    .thank-you-page {
        padding: 2rem 0;
    }

    .thank-you-content {
        padding: 0 1rem;
    }

    .thank-you-icon i {
        font-size: 3rem;
    }

    .thank-you-content h1 {
        font-size: 1.75rem;
    }

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

    .step-card {
        padding: 1.5rem;
    }

    .step-icon i {
        font-size: 2rem;
    }

    .cta-buttons {
        flex-direction: column;
        align-items: center;
    }

    .cta-buttons .btn {
        width: 100%;
        max-width: 280px;
        justify-content: center;
    }
}

/* Small Mobile Styles */
@media screen and (max-width: 480px) {
    .container {
        padding: 0 10px;
    }

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

    h2 {
        font-size: 1.5rem;
    }

    /* Hero */
    .hero-text h1 {
        font-size: 1.75rem;
        line-height: 1.3;
    }

    .hero-text p {
        font-size: 0.95rem;
    }

    /* Buttons */
    .btn {
        padding: 10px 16px;
        font-size: 0.9rem;
    }

    /* Sections */
    section {
        padding: 40px 0;
    }

    /* Cards */
    .service-card,
    .course-card,
    .testimonial-card {
        margin: 0;
    }

    .course-content,
    .service-card,
    .testimonial-card {
        padding: 1.25rem;
    }

    /* Images */
    .hero-image img,
    .about-image img {
        max-width: 350px;
        margin: 0 auto;
        display: block;
    }

    .course-image img {
        height: 180px;
        object-fit: cover;
    }

    /* Image placeholders */
    .image-placeholder {
        padding: 1.5rem;
        min-height: 150px;
    }

    .image-placeholder i {
        font-size: 2rem;
    }

    /* Newsletter */
    .newsletter-form-container {
        padding: 1.25rem;
    }

    /* Contact */
    .contact-form-container {
        padding: 1.25rem;
    }

    /* Footer */
    .footer-section h3 {
        font-size: 1.1rem;
    }

    /* Cookie elements */
    .cookie-modal-content {
        width: 98%;
        margin: 10px;
    }

    .cookie-text h3 {
        font-size: 1rem;
    }

    .cookie-buttons .btn {
        padding: 8px 12px;
        font-size: 0.85rem;
    }

    /* Legal pages */
    .legal-content {
        padding: 1rem;
    }

    .cookie-table {
        font-size: 0.8rem;
    }

    .cookie-table th,
    .cookie-table td {
        padding: 6px;
    }
}

/* Landscape Mobile */
@media screen and (max-width: 896px) and (orientation: landscape) {
    .hero {
        padding: 40px 0;
        min-height: 400px;
    }

    .hero-text h1 {
        font-size: 2rem;
    }

    section {
        padding: 50px 0;
    }

    .nav-menu {
        top: 60px;
    }
}

/* Print Styles */
@media print {
    .header,
    .footer,
    .cookie-banner,
    .cookie-modal,
    .nav-toggle,
    .btn,
    .social-links {
        display: none !important;
    }

    main {
        margin-top: 0;
    }

    body {
        font-size: 12pt;
        line-height: 1.4;
        color: black;
    }

    h1, h2, h3 {
        color: black;
        page-break-after: avoid;
    }

    .legal-content {
        box-shadow: none;
        padding: 0;
    }

    a {
        color: black;
        text-decoration: underline;
    }

    .section-header {
        margin-bottom: 1rem;
    }

    .legal-section {
        margin-bottom: 1.5rem;
        page-break-inside: avoid;
    }
}

/* High DPI Displays */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .image-placeholder i {
        font-size: 3.2rem;
    }

    .service-icon i {
        font-size: 2.1rem;
    }

    .testimonial-rating {
        font-size: 1.1rem;
    }
}

/* Hover Support Check */
@media (hover: none) {
    .btn:hover,
    .service-card:hover,
    .course-card:hover,
    .nav-link:hover,
    .social-links a:hover {
        transform: none;
        box-shadow: initial;
        background-color: initial;
    }

    .btn-primary:hover {
        background-color: #007bff;
    }

    .btn-outline:hover {
        background-color: transparent;
        color: #007bff;
    }
}

/* Focus visible for better accessibility */
@supports selector(:focus-visible) {
    button:focus,
    input:focus,
    select:focus,
    textarea:focus,
    a:focus {
        outline: none;
    }

    button:focus-visible,
    input:focus-visible,
    select:focus-visible,
    textarea:focus-visible,
    a:focus-visible {
        outline: 2px solid #007bff;
        outline-offset: 2px;
    }
}
