/* ================================================
   OTHMAN ALSHAHRANI - PROFESSIONAL PHOTOGRAPHER
   Responsive Stylesheet
   ================================================ */

/* ==================== LARGE DESKTOP (1400px+) ==================== */
@media (min-width: 1400px) {
    .container {
        max-width: 1400px;
    }
    
    .hero-title {
        font-size: 8rem;
    }
}

/* ==================== DESKTOP (1200px - 1399px) ==================== */
@media (max-width: 1399px) {
    .hero-title {
        font-size: 6rem;
    }
    
    .services-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .portfolio-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* ==================== LAPTOP (992px - 1199px) ==================== */
@media (max-width: 1199px) {
    :root {
        --spacing-xl: 2.5rem;
        --spacing-xxl: 3rem;
    }
    
    .hero-title {
        font-size: 5rem;
    }
    
    .about-grid {
        gap: var(--spacing-lg);
    }
    
    .footer-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--spacing-lg);
    }
}

/* ==================== TABLET LANDSCAPE (768px - 991px) ==================== */
@media (max-width: 991px) {
    :root {
        --spacing-lg: 2rem;
        --spacing-xl: 2.5rem;
        --spacing-xxl: 3rem;
    }
    
    /* Navigation */
    .nav-menu {
        display: none;
    }
    
    .hamburger {
        display: flex;
    }
    
    /* Hero */
    .hero-title {
        font-size: 4rem;
    }
    
    .hero-subtitle span:not(.line) {
        font-size: 0.75rem;
    }
    
    .hero-subtitle .line {
        width: 40px;
    }
    
    /* About */
    .about-grid {
        grid-template-columns: 1fr;
        gap: var(--spacing-xl);
    }
    
    .about-image {
        max-width: 500px;
        margin: 0 auto;
    }
    
    .experience-badge {
        right: 0;
        bottom: -20px;
    }
    
    /* Portfolio */
    .portfolio-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    /* Services */
    .services-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    /* Contact */
    .contact-grid {
        grid-template-columns: 1fr;
        gap: var(--spacing-lg);
    }
    
    /* Footer */
    .footer-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* ==================== TABLET PORTRAIT (576px - 767px) ==================== */
@media (max-width: 767px) {
    :root {
        --spacing-md: 1rem;
        --spacing-lg: 1.5rem;
        --spacing-xl: 2rem;
        --spacing-xxl: 2.5rem;
    }
    
    /* Custom Cursor - Hide on touch devices */
    .cursor-dot,
    .cursor-outline {
        display: none;
    }
    
    body {
        cursor: auto;
    }
    
    /* Navigation */
    .nav-logo .logo-main {
        font-size: 1.2rem;
    }
    
    .nav-logo .logo-sub {
        font-size: 0.6rem;
    }
    
    .lang-toggle {
        padding: 6px 12px;
        font-size: 0.75rem;
    }
    
    /* Hero */
    .hero {
        min-height: 600px;
    }
    
    .hero-title {
        font-size: 3rem;
    }
    
    .hero-subtitle {
        flex-direction: column;
        gap: var(--spacing-sm);
    }
    
    .hero-subtitle .line {
        width: 50px;
    }
    
    .hero-cta {
        flex-direction: column;
        gap: var(--spacing-sm);
    }
    
    .btn {
        width: 100%;
        justify-content: center;
    }
    
    .hero-scroll-indicator {
        bottom: var(--spacing-md);
    }
    
    /* About */
    .about-skills {
        grid-template-columns: 1fr;
    }
    
    .about-stats {
        grid-template-columns: repeat(3, 1fr);
        gap: var(--spacing-sm);
    }
    
    .stat-number {
        font-size: 2rem;
    }
    
    /* Portfolio */
    .portfolio-filters {
        gap: var(--spacing-xs);
    }
    
    .filter-btn {
        padding: 10px 20px;
        font-size: 0.8rem;
    }
    
    .portfolio-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--spacing-sm);
    }
    
    /* Services */
    .services-grid {
        grid-template-columns: 1fr;
    }
    
    .service-card {
        padding: var(--spacing-md);
    }
    
    /* Testimonials */
    .swiper-button-prev,
    .swiper-button-next {
        display: none;
    }
    
    .testimonial-card {
        padding: var(--spacing-md);
    }
    
    .testimonial-text {
        font-size: 1rem;
    }
    
    /* Contact */
    .contact-form {
        grid-template-columns: 1fr;
    }
    
    .form-group.full-width {
        grid-column: span 1;
    }
    
    .btn-submit {
        grid-column: span 1;
    }
    
    .contact-form-wrapper {
        padding: var(--spacing-md);
    }
    
    /* Footer */
    .footer-grid {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .footer-links h4::after,
    .footer-services h4::after,
    .footer-contact h4::after {
        right: 50%;
        transform: translateX(50%);
    }
    
    .footer-contact ul li {
        justify-content: center;
    }
    
    .footer-bottom-content {
        flex-direction: column;
        gap: var(--spacing-sm);
    }
    
    /* WhatsApp Float */
    .whatsapp-float {
        width: 55px;
        height: 55px;
        bottom: 20px;
        left: 20px;
    }
    
    .whatsapp-float i {
        font-size: 1.75rem;
    }
    
    .whatsapp-tooltip {
        display: none;
    }
    
    /* Back to Top */
    .back-to-top {
        width: 45px;
        height: 45px;
        bottom: 20px;
        right: 20px;
    }
    
    /* Lightbox */
    .lightbox-close {
        top: 15px;
        right: 15px;
        width: 40px;
        height: 40px;
    }
    
    .lightbox-prev,
    .lightbox-next {
        width: 40px;
        height: 40px;
    }
    
    .lightbox-prev {
        left: 15px;
    }
    
    .lightbox-next {
        right: 15px;
    }
}

/* ==================== MOBILE (up to 575px) ==================== */
@media (max-width: 575px) {
    :root {
        --spacing-sm: 0.5rem;
        --spacing-md: 0.75rem;
        --spacing-lg: 1.25rem;
        --spacing-xl: 1.5rem;
        --spacing-xxl: 2rem;
    }
    
    html {
        font-size: 14px;
    }
    
    /* Navigation */
    .navbar {
        padding: var(--spacing-sm) 0;
    }
    
    .nav-container {
        padding: 0 var(--spacing-sm);
    }
    
    .nav-logo .logo-main {
        font-size: 1rem;
        letter-spacing: 0.15em;
    }
    
    .nav-logo .logo-sub {
        font-size: 0.5rem;
        letter-spacing: 0.3em;
    }
    
    /* Mobile Menu */
    .mobile-nav-link {
        font-size: 1.75rem;
    }
    
    .mobile-menu-social a {
        width: 45px;
        height: 45px;
    }
    
    /* Hero */
    .hero {
        min-height: 100vh;
        min-height: 100svh;
    }
    
    .hero-title {
        font-size: 2.5rem;
        letter-spacing: 0.05em;
    }
    
    .hero-title .title-line.golden {
        font-size: 2rem;
    }
    
    .typed-text {
        font-size: 1rem;
    }
    
    .hero-description {
        margin-bottom: var(--spacing-md);
    }
    
    .btn {
        padding: 14px 28px;
        font-size: 0.85rem;
    }
    
    /* Section Headers */
    .section-title {
        font-size: 1.75rem;
    }
    
    .section-subtitle {
        font-size: 0.75rem;
        letter-spacing: 0.2em;
    }
    
    /* About */
    .image-frame img {
        border-radius: var(--radius-sm);
    }
    
    .frame-border {
        top: 10px;
        left: 10px;
        right: -10px;
        bottom: -10px;
    }
    
    .experience-badge {
        width: 90px;
        height: 90px;
        bottom: -15px;
        right: -10px;
    }
    
    .experience-badge .years {
        font-size: 1.75rem;
    }
    
    .experience-badge .text {
        font-size: 0.6rem;
    }
    
    .about-text p {
        font-size: 0.95rem;
    }
    
    .about-stats {
        grid-template-columns: 1fr;
    }
    
    .stat-item {
        padding: var(--spacing-sm);
    }
    
    /* Portfolio */
    .portfolio-grid {
        grid-template-columns: 1fr;
    }
    
    .portfolio-item {
        aspect-ratio: 4/3;
    }
    
    .portfolio-filters {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .filter-btn {
        padding: 8px 16px;
        font-size: 0.75rem;
        flex: 0 0 auto;
    }
    
    /* Services */
    .service-icon {
        width: 60px;
        height: 60px;
    }
    
    .service-icon i {
        font-size: 1.5rem;
    }
    
    .service-title {
        font-size: 1.1rem;
    }
    
    .service-description {
        font-size: 0.85rem;
    }
    
    /* Testimonials */
    .testimonial-card {
        padding: var(--spacing-md) var(--spacing-sm);
    }
    
    .testimonial-quote {
        font-size: 2rem;
        top: var(--spacing-sm);
        right: var(--spacing-sm);
    }
    
    .testimonial-text {
        font-size: 0.9rem;
    }
    
    /* Contact */
    .contact-item {
        flex-direction: column;
        text-align: center;
        gap: var(--spacing-sm);
    }
    
    .contact-social {
        justify-content: center;
        flex-wrap: wrap;
    }
    
    .social-link {
        width: 45px;
        height: 45px;
        font-size: 1rem;
    }
    
    .form-group input,
    .form-group select,
    .form-group textarea {
        padding: 14px 16px;
        font-size: 0.9rem;
    }
    
    .form-group label {
        font-size: 0.8rem;
        right: 16px;
    }
    
    /* Footer */
    .footer-logo .logo-main {
        font-size: 1.25rem;
    }
    
    .footer-brand p {
        font-size: 0.85rem;
    }
    
    .footer-links h4,
    .footer-services h4,
    .footer-contact h4 {
        font-size: 1rem;
    }
    
    .footer-social a {
        width: 35px;
        height: 35px;
        font-size: 0.9rem;
    }
    
    /* Preloader */
    .preloader-logo .logo-text {
        font-size: 2rem;
        letter-spacing: 0.3em;
    }
    
    .preloader-logo .logo-text-secondary {
        font-size: 1rem;
        letter-spacing: 0.5em;
    }
    
    .preloader-bar {
        width: 150px;
    }
}

/* ==================== VERY SMALL MOBILE (up to 375px) ==================== */
@media (max-width: 375px) {
    html {
        font-size: 13px;
    }
    
    .hero-title {
        font-size: 2rem;
    }
    
    .hero-title .title-line.golden {
        font-size: 1.75rem;
    }
    
    .nav-logo .logo-main {
        font-size: 0.9rem;
    }
    
    .preloader-logo .logo-text {
        font-size: 1.5rem;
        letter-spacing: 0.2em;
    }
    
    .preloader-logo .logo-text-secondary {
        font-size: 0.8rem;
        letter-spacing: 0.3em;
    }
}

/* ==================== LANDSCAPE MOBILE ==================== */
@media (max-height: 500px) and (orientation: landscape) {
    .hero {
        min-height: 100vh;
        padding: var(--spacing-xl) 0;
    }
    
    .hero-title {
        font-size: 2.5rem;
    }
    
    .hero-scroll-indicator {
        display: none;
    }
    
    .hero-slider .slide.active {
        opacity: 0.2;
    }
}

/* ==================== HIGH DPI SCREENS ==================== */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .scroll-progress {
        height: 2px;
    }
}

/* ==================== DARK MODE SUPPORT ==================== */
@media (prefers-color-scheme: dark) {
    /* Already dark theme, no changes needed */
}

/* ==================== PRINT STYLES ==================== */
@media print {
    .navbar,
    .whatsapp-float,
    .back-to-top,
    .hero-scroll-indicator,
    .preloader,
    .cursor-dot,
    .cursor-outline,
    .scroll-progress {
        display: none !important;
    }
    
    body {
        background-color: white;
        color: black;
    }
    
    .hero {
        height: auto;
        min-height: auto;
        padding: 2rem 0;
    }
    
    section {
        padding: 2rem 0;
        break-inside: avoid;
    }
    
    a {
        color: black;
        text-decoration: underline;
    }
}

/* ==================== REDUCED MOTION ==================== */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
    
    .hero-slider .slide {
        transition: none;
    }
    
    .whatsapp-float {
        animation: none;
    }
}

/* ==================== TOUCH DEVICE OPTIMIZATIONS ==================== */
@media (hover: none) {
    .portfolio-item .portfolio-overlay {
        opacity: 1;
        background: linear-gradient(
            180deg,
            transparent 40%,
            rgba(10, 10, 10, 0.9) 100%
        );
    }
    
    .portfolio-zoom {
        transform: translate(-50%, -50%) scale(1);
    }
    
    .service-card:hover {
        transform: none;
    }
    
    .hover-lift:hover {
        transform: none;
    }
    
    .btn-outline::before {
        display: none;
    }
    
    .nav-link::before {
        display: none;
    }
}

/* ==================== MOBILE SECTION SPACING FIX ==================== */
@media (max-width: 767px) {
    section {
        padding: 2rem 0 !important;
    }
    
    .section-header {
        margin-bottom: 1.5rem !important;
    }
    
    .about-grid,
    .contact-grid {
        gap: 1.5rem !important;
    }
    
    .portfolio-grid {
        gap: 0.75rem !important;
    }
    
    .services-grid {
        gap: 1rem !important;
    }
    
    .footer-top {
        padding: 1.5rem 0 !important;
    }
    
    .footer-grid {
        gap: 1.5rem !important;
    }
}

@media (max-width: 575px) {
    section {
        padding: 1.5rem 0 !important;
    }
    
    .section-header {
        margin-bottom: 1rem !important;
    }
    
    .about-grid,
    .contact-grid {
        gap: 1rem !important;
    }
    
    .portfolio-grid {
        gap: 0.5rem !important;
    }
    
    .services-grid {
        gap: 0.75rem !important;
    }
    
    .footer-top {
        padding: 1rem 0 !important;
    }
    
    .footer-grid {
        gap: 1rem !important;
    }
    
    .about-stats {
        gap: 0.5rem !important;
    }
}

/* ==================== SAFARI SPECIFIC FIXES ==================== */
@supports (-webkit-touch-callout: none) {
    .hero {
        min-height: -webkit-fill-available;
    }
    
    .glass {
        backdrop-filter: blur(10px);
        -webkit-backdrop-filter: blur(10px);
    }
}

/* ==================== FIREFOX SPECIFIC FIXES ==================== */
@-moz-document url-prefix() {
    .scroll-progress {
        background: var(--color-gold-primary);
    }
}
