/* Raio Solar - CSS Responsivo */

/* Tablets grandes (1024px e abaixo) */
@media (max-width: 1024px) {
    .container {
        padding: 0 24px;
    }
    
    .hero .container {
        gap: 2rem;
    }
    
    .services-grid {
        grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    }
    
    .about-content {
        gap: 2rem;
    }
    
    .contact-content {
        gap: 2rem;
    }
}

/* Tablets (768px e abaixo) */
@media (max-width: 768px) {
    /* Header responsivo */
    .nav-menu {
        position: fixed;
        left: -100%;
        top: 100%;
        flex-direction: column;
        background: rgb(21, 24, 28);
        width: 100%;
        text-align: center;
        transition: var(--transition-medium);
        box-shadow: var(--shadow-medium);
        padding: 2rem 0;
        border-radius: 0 0 var(--border-radius) var(--border-radius);
    }
    
    .nav-menu.active {
        left: 0;
    }
    
    .nav-menu li {
        margin: 1rem 0;
    }
    
    .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 responsivo */
    .hero {
        padding: 120px 0 60px;
        text-align: center;
    }
    
    .hero .container {
        grid-template-columns: 1fr;
        gap: 3rem;
    }
    
    .hero-buttons {
        justify-content: center;
        flex-direction: column;
        align-items: center;
    }
    
    .hero-buttons .btn {
        width: 100%;
        max-width: 300px;
    }
    
    /* Seções responsivas */
    .services-grid {
        grid-template-columns: 1fr;
    }
    
    .service-card.featured {
        transform: none;
    }
    
    .benefits-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }
    
    .about-content {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .about-stats {
        grid-template-columns: repeat(3, 1fr);
        gap: 1rem;
    }
    
    .contact-content {
        grid-template-columns: 1fr;
    }
    
    .contact-info {
        order: 2;
        text-align: center;
    }
    
    .contact-form {
        order: 1;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        gap: 2rem;
        text-align: center;
    }
    
    /* Ajustes de espaçamento */
    .section-padding {
        padding: 60px 0;
    }
    
    .section-header {
        margin-bottom: 3rem;
    }
}

/* Mobile (480px e abaixo) */
@media (max-width: 480px) {
    .container {
        padding: 0 16px;
    }
    
    /* Tipografia responsiva */
    h1 {
        font-size: 2rem;
        line-height: 1.2;
    }
    
    h2 {
        font-size: 1.8rem;
    }
    
    h3 {
        font-size: 1.4rem;
    }
    
    p {
        font-size: 1rem;
    }
    
    .hero-subtitle {
        font-size: 1.1rem;
    }
    
    .section-subtitle {
        font-size: 1.1rem;
    }
    
    /* Header mobile */
    .navbar {
        padding: 0.8rem 0;
    }
    
    .nav-brand .logo {
        height: 40px;
    }
    
    /* Hero mobile */
    .hero {
        padding: 100px 0 40px;
        min-height: auto;
    }
    
    .solar-animation {
        width: 150px;
        height: 150px;
    }
    
    .solar-animation i {
        font-size: 60px;
    }
    
    /* Cards e componentes */
    .service-card {
        padding: 1.5rem;
    }
    
    .service-icon,
    .benefit-icon {
        width: 60px;
        height: 60px;
    }
    
    .service-icon i,
    .benefit-icon i {
        font-size: 1.5rem;
    }
    
    .benefit-item {
        padding: 1rem;
    }
    
    /* Benefits grid mobile */
    .benefits-grid {
        grid-template-columns: 1fr;
    }
    
    /* Stats mobile */
    .about-stats {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .stat-item {
        padding: 1rem;
    }
    
    .stat-number {
        font-size: 2rem;
    }
    
    /* About image mobile */
    .image-placeholder {
        width: 200px;
        height: 200px;
    }
    
    .image-placeholder i {
        font-size: 2.5rem;
    }
    
    .image-placeholder p {
        font-size: 1rem;
    }
    
    /* Contact mobile */
    .contact-item {
        text-align: left;
        gap: 1rem;
    }
    
    .contact-icon {
        width: 50px;
        height: 50px;
    }
    
    .contact-icon i {
        font-size: 1.2rem;
    }
    
    /* Form mobile */
    .form {
        padding: 1.5rem;
    }
    
    /* Botões mobile */
    .btn {
        padding: 12px 20px;
        font-size: 0.95rem;
    }
    
    /* Seções mobile */
    :root {
        --section-padding: 40px 0;
    }
    
    .section-header {
        margin-bottom: 2rem;
    }
    
    /* Footer mobile */
    .footer {
        padding: 2rem 0 1rem;
    }
    
    .footer-brand .footer-logo {
        height: 50px;
    }
}

/* Mobile pequeno (360px e abaixo) */
@media (max-width: 360px) {
    .container {
        padding: 0 12px;
    }
    
    h1 {
        font-size: 1.8rem;
    }
    
    h2 {
        font-size: 1.6rem;
    }
    
    .hero {
        padding: 90px 0 30px;
    }
    
    .service-card {
        padding: 1rem;
    }
    
    .form {
        padding: 1rem;
    }
    
    .btn {
        padding: 10px 16px;
        font-size: 0.9rem;
    }
}

/* Landscape mobile */
@media (max-height: 500px) and (orientation: landscape) {
    .hero {
        padding: 80px 0 20px;
        min-height: auto;
    }
    
    .hero .container {
        grid-template-columns: 1fr 1fr;
        gap: 2rem;
    }
    
    .hero-content {
        text-align: left;
    }
    
    .hero-buttons {
        flex-direction: row;
        justify-content: flex-start;
    }
    
    .hero-buttons .btn {
        width: auto;
        max-width: none;
    }
}

/* Impressão */
@media print {
    .header,
    .nav-toggle,
    .hero-buttons,
    .btn,
    .footer {
        display: none !important;
    }
    
    .hero {
        background: var(--white) !important;
        color: var(--dark-gray) !important;
        padding: 20px 0;
    }
    
    .hero-title,
    .section-title,
    h1, h2, h3 {
        color: var(--dark-gray) !important;
    }
    
    .service-card,
    .benefit-item,
    .about-content {
        break-inside: avoid;
    }
    
    body {
        font-size: 12pt;
        line-height: 1.4;
    }
}

/* High DPI displays */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .nav-brand .logo,
    .footer-brand .footer-logo {
        image-rendering: -webkit-optimize-contrast;
        image-rendering: crisp-edges;
    }
}

/* Reduce motion for accessibility */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    .solar-animation i,
    .solar-rays,
    .solar-rays::before,
    .solar-rays::after {
        animation: none !important;
    }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    :root {
        --white: #1a1a1a;
        --light-gray: #2d2d2d;
        --gray: #a0a0a0;
        --dark-gray: #ffffff;
    }
    
    .header {
        background: rgba(26, 26, 26, 0.95);
    }
    
    .nav-menu {
        background: rgb(21, 24, 28);
    }
}

/* Focus styles for accessibility */
.btn:focus,
.nav-link:focus,
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: 2px solid var(--solar-yellow);
    outline-offset: 2px;
}

/* Skip to content link for accessibility */
.skip-link {
    position: absolute;
    top: -40px;
    left: 6px;
    background: var(--dark-blue);
    color: var(--white);
    padding: 8px;
    text-decoration: none;
    border-radius: 4px;
    z-index: 10000;
}

.skip-link:focus {
    top: 6px;
}

/* Loading states */
.loading {
    opacity: 0.6;
    pointer-events: none;
    position: relative;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    border: 2px solid var(--primary-green);
    border-top: 2px solid transparent;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Error states */
.error {
    border-color: #dc3545 !important;
    box-shadow: 0 0 0 3px rgba(220, 53, 69, 0.1) !important;
}

.error-message {
    color: #dc3545;
    font-size: 0.9rem;
    margin-top: 0.5rem;
}

/* Success states */
.success {
    border-color: var(--primary-green) !important;
    box-shadow: 0 0 0 3px rgba(46, 139, 87, 0.1) !important;
}

.success-message {
    color: var(--primary-green);
    font-size: 0.9rem;
    margin-top: 0.5rem;
}
/* Gallery responsivo */
@media (max-width: 768px) {
    .gallery-grid {
        grid-template-columns: 1fr;
        gap: 1.2rem;
    }
    
    .gallery-item {
        aspect-ratio: 16/9;
    }
}

@media (max-width: 480px) {
    .gallery-content h3 {
        font-size: 1.1rem;
    }
    
    .gallery-content p {
        font-size: 0.85rem;
    }
    
    .gallery-overlay {
        padding: 1rem;
    }
}
