/* Responsive Styles - Proficio Marketing */

/* ========================================
   LARGE DESKTOP (max-width: 1199px)
   ======================================== */
@media (max-width: 1199.98px) {
    .container {
        max-width: 960px;
    }

    h1 {
        font-size: 3.5rem;
    }

    h2 {
        font-size: 2rem;
    }

    .hero-content h1 {
        font-size: 3.5rem;
    }

    .about-content,
    .about-content.reverse {
        grid-template-columns: 1fr 1fr;
    }

    .services-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 15px;
    }

    .detail-grid {
        gap: var(--spacing-lg);
    }
}

/* ========================================
   TABLET (max-width: 991px)
   ======================================== */
@media (max-width: 991.98px) {
    .container {
        max-width: 720px;
    }

    h1 {
        font-size: 3rem;
    }

    h2 {
        font-size: 1.8rem;
    }

    .hero-content h1 {
        font-size: 3rem;
    }

    .hero-content h1 span {
        font-size: 1.3rem;
    }

    /* About */
    .about-content {
        grid-template-columns: 1fr;
        gap: var(--spacing-md);
    }

    .about-content.reverse {
        grid-template-columns: 1fr;
    }

    .about-content.reverse .about-text {
        order: 2;
    }

    .about-content.reverse .about-image {
        order: 1;
    }

    .about-image img {
        max-width: 100%;
        margin: 0 auto;
    }

    .about-text {
        font-size: 1rem;
        text-align: left;
    }

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

    /* Services Detail */
    .detail-intro::before {
        display: block;
    }

    .detail-card {
        grid-template-columns: 1fr;
        gap: var(--spacing-md);
    }

    .detail-card.reverse {
        direction: ltr;
    }

    .detail-card-image {
        order: -1;
    }

    .detail-card {
        padding: var(--spacing-md);
    }

    /* Contact */
    .contact-wrapper {
        grid-template-columns: 1fr;
        gap: var(--spacing-lg);
        padding: var(--spacing-lg);
    }

    .newsletter-wrapper {
        flex-direction: row;
        align-items: stretch;
    }

    .newsletter-logo {
        flex: 0 0 180px;
        display: flex;
        align-items: center;
    }

    .newsletter-form {
        flex: 1;
    }

    /* Footer */
    .footer-content {
        flex-direction: column;
        text-align: center;
    }

    .footer-contact {
        flex-direction: column;
        gap: var(--spacing-sm);
    }
}

/* ========================================
   MOBILE LANDSCAPE (max-width: 767px)
   ======================================== */
@media (max-width: 767.98px) {
    :root {
        --spacing-xl: 3rem;
    }

    .container {
        max-width: 540px;
        padding: 0 var(--spacing-sm);
    }

    section {
        padding: var(--spacing-lg) 0;
    }

    h1 {
        font-size: 2.5rem;
    }

    h2 {
        font-size: 1.25rem;
        letter-spacing: 1px;
    }

    .section-subtitle,
    .contact-section .section-subtitle {
        font-size: 1.25rem;
    }

    .detail-card-content h3 {
        font-size: 1.1rem;
    }

    .detail-card-content ul {
        font-family: var(--condensed-font);
    }

    /* Header */
    .main-nav {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: var(--bg-white);
        padding: var(--spacing-md);
        border-top: 1px solid var(--border-light);
        box-shadow: var(--shadow-md);
    }

    .main-nav.active {
        display: block;
    }

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

    .main-nav li {
        border-bottom: 1px solid var(--border-light);
    }

    .main-nav li:last-child {
        border-bottom: none;
    }

    .main-nav a {
        display: block;
        padding: var(--spacing-sm);
        text-align: center;
        color: var(--text-dark) !important;
    }

    .lang-switcher {
        margin-left: auto;
        margin-right: var(--spacing-sm);
    }

    .mobile-menu-toggle {
        display: flex;
    }

    .mobile-menu-toggle.active span:nth-child(1) {
        transform: translateY(7px) rotate(45deg);
    }

    .mobile-menu-toggle.active span:nth-child(2) {
        opacity: 0;
    }

    .mobile-menu-toggle.active span:nth-child(3) {
        transform: translateY(-7px) rotate(-45deg);
    }

    /* Hero Subtitle */
    .hero-subtitle {
        font-size: 0.9rem;
        line-height: 1.6;
    }

    .hero-subtitle + .hero-subtitle {
        margin-top: 1.5rem;
    }

    .mobile-break {
        display: block;
    }

    .hero-scroll-indicator {
        display: none;
    }

    /* Hero */
    .hero-section {
        min-height: auto;
        padding: 120px 0 80px;
    }

    .hero-content h1 {
        font-size: 3rem;
    }

    .hero-content h1 span {
        font-size: 1.2rem;
    }

    .about-text {
        font-size: 1rem;
    }

    .detail-card {
        background: transparent;
        border: none;
        padding: 0;
    }

    .contact-wrapper {
        box-shadow: var(--shadow-sm);
        padding: var(--spacing-md);
    }

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

    .service-card {
        padding: var(--spacing-md) var(--spacing-sm);
    }

    .service-card .icon {
        width: 50px;
        height: 50px;
    }

    .service-card h3 {
        font-size: 0.8rem;
    }

    /* Services Detail */

    .detail-intro {
        font-size: 1rem;
        text-align: left;
        padding-left: var(--spacing-md);
    }

    .detail-intro::before {
        width: 6px;
    }

    .detail-cta {
        font-size: 1rem;
    }

    .detail-card-content ul {
        font-size: 0.9rem;
    }

    /* Contact */
    .contact-form-wrapper h3,
    .newsletter-form h3 {
        font-size: 0.9rem;
        font-family: var(--condensed-font);
    }

    .form-group input,
    .form-group textarea {
        font-family: var(--condensed-font);
    }

    .newsletter-wrapper {
        flex-direction: column;
    }

    .newsletter-logo {
        flex: none;
    }

    /* Footer */
    .social-icons a {
        width: 40px;
        height: 40px;
    }

    #back-to-top {
        right: 15px;
        bottom: 15px;
        width: 44px;
        height: 44px;
    }
}

/* ========================================
   MOBILE PORTRAIT (max-width: 575px)
   ======================================== */
@media (max-width: 575.98px) {
    .container {
        padding: 0 var(--spacing-sm);
    }

    h1 {
        font-size: 2rem;
    }

    h2 {
        font-size: 1.1rem;
    }

    .section-subtitle,
    .contact-section .section-subtitle {
        font-size: 1.1rem;
    }

    .detail-card-content h3 {
        font-size: 1rem;
    }

    .hero-content h1 {
        font-size: 3rem;
    }

    .hero-content h1 span {
        font-size: 1rem;
    }

    .hero-subtitle {
        font-size: 0.8rem;
        line-height: 1.6;
    }

    .hero-subtitle br {
        display: block;
        content: '';
        margin-top: 3rem;
    }

    .btn {
        padding: 12px 24px;
        font-size: 0.85rem;
    }

    /* Logo */
    .logo img {
        height: 65px;
    }

    /* About */
    .about-text {
        border-left: none;
        padding-left: 0;
        font-size: 0.95rem;
    }

    /* Service Cards */
    .services-grid {
        grid-template-columns: 1fr 1fr;
        gap: 10px;
    }

    .service-card {
        padding: var(--spacing-sm);
    }

    .service-card .icon {
        width: 40px;
        height: 40px;
        margin-bottom: var(--spacing-sm);
    }

    .service-card h3 {
        font-size: 0.7rem;
        margin-bottom: var(--spacing-sm);
    }

    .service-card .btn {
        font-size: 0.65rem;
        padding: 5px 0;
    }

    /* Detail Cards */
    .detail-card-image img {
        height: 180px;
    }

    .detail-intro {
        border-left: none;
        padding-left: 0;
    }

    /* Form */
    .form-group input,
    .form-group textarea {
        padding: 12px 16px;
        font-size: 0.95rem;
    }

    .contact-wrapper {
        background: transparent;
        box-shadow: none;
        padding: 0;
        border-radius: 0;
    }

    /* Footer */
    .footer-bottom p {
        font-size: 0.8rem;
    }
}

/* ========================================
   EXTRA SMALL (max-width: 400px)
   ======================================== */
@media (max-width: 400px) {
    .hero-content h1 {
        font-size: 2.5rem;
    }

    .hero-content h1 span {
        font-size: 0.9rem;
    }

    .hero-subtitle {
        font-size: 0.75rem;
    }

    h2 {
        font-size: 1rem;
    }

    .section-subtitle,
    .contact-section .section-subtitle {
        font-size: 1rem;
    }

    .detail-card-content h3 {
        font-size: 0.95rem;
    }

    .about-image img {
        max-width: 100%;
    }

    .services-grid {
        grid-template-columns: 1fr 1fr;
    }

    .service-card h3 {
        font-size: 0.65rem;
    }
}

/* ========================================
   LANDSCAPE ORIENTATION FIXES
   ======================================== */
@media (max-height: 500px) and (orientation: landscape) {
    .hero-section {
        min-height: auto;
        padding: 100px 0 60px;
    }

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

/* ========================================
   HIGH DPI / RETINA DISPLAYS
   ======================================== */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .logo img {
        image-rendering: -webkit-optimize-contrast;
    }
}

/* ========================================
   PRINT STYLES
   ======================================== */
@media print {
    #header,
    #back-to-top,
    .mobile-menu-toggle,
    .btn {
        display: none !important;
    }

    body {
        background: white;
        color: black;
    }

    section {
        page-break-inside: avoid;
    }

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