/* ===================================
   Responsive Design - Mobile First
   =================================== */

/* Tablet - 768px and below */
@media (max-width: 1024px) {
    :root {
        --font-size-h1: 40px;
        --font-size-h2: 28px;
        --spacing-xl: 30px;
        --spacing-xxl: 50px;
    }
    
    .container {
        padding: 0 var(--spacing-lg);
    }
    
    .hero-content {
        padding: var(--spacing-xl);
        max-width: 700px;
    }
    
    .hero-title {
        font-size: 48px;
    }
    
    .hero-text {
        font-size: 20px;
    }
    
    .about-features {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    }
    
    .carousel-container {
        padding: 0 50px;
    }
    
    .carousel-slide {
        flex: 0 0 100%;
        min-width: 100%;
        max-width: 100%;
    }
    
    .carousel-slide img {
        height: 400px;
        object-fit: cover;
    }
}

/* Mobile - 768px and below */
@media (max-width: 768px) {
    :root {
        --font-size-h1: 32px;
        --font-size-h2: 24px;
        --font-size-h3: 20px;
        --font-size-lg: 16px;
        --spacing-xl: 24px;
        --spacing-xxl: 40px;
    }
    
    /* Hide desktop sidebar */
    .sidebar {
        transform: translateX(-100%);
        transition: transform var(--transition-normal);
        width: 280px;
        box-shadow: 2px 0 10px rgba(0, 0, 0, 0.5);
        padding-top: 80px; /* Space for mobile header */
    }
    
    .sidebar.active {
        transform: translateX(0);
    }
    
    /* Show mobile header */
    .mobile-header {
        display: block;
    }
    
    /* Adjust main content */
    .main-content {
        margin-left: 0;
        margin-top: 60px;
    }
    
    /* Hero Section */
    .hero-section {
        height: calc(100vh - 60px);
    }
    
    .hero-content {
        padding: var(--spacing-lg);
        max-width: 100%;
    }
    
    .hero-title {
        font-size: 36px;
        margin-bottom: var(--spacing-md);
    }
    
    .hero-text {
        font-size: 18px;
        margin-bottom: var(--spacing-md);
    }
    
    /* Reposition hero elements for mobile */
    .location-badge {
        position: static;
        margin-top: var(--spacing-xl);
        margin-bottom: var(--spacing-md);
    }
    
    .cta-button {
        position: static;
        display: flex;
        width: 100%;
        justify-content: center;
    }
    
    /* Sections */
    section {
        padding: var(--spacing-xxl) 0;
        min-height: auto;
    }
    
    .container {
        padding: 0 var(--spacing-md);
    }
    
    /* About Section */
    .about-text p {
        font-size: var(--font-size-base);
    }
    
    .about-features {
        grid-template-columns: 1fr;
        gap: var(--spacing-md);
    }
    
    /* Gallery */
    .carousel-container {
        padding: 0 50px;
    }
    
    .carousel-slide img {
        height: 300px;
    }
    
    .carousel-btn {
        width: 40px;
        height: 40px;
    }
    
    .carousel-btn svg {
        width: 20px;
        height: 20px;
    }
    
    /* Contact Form */
    .form-row {
        grid-template-columns: 1fr;
        gap: 0;
    }
    
    /* Footer */
    .footer {
        margin-left: 0;
    }
    
    .footer-content {
        flex-direction: column;
        text-align: center;
        padding: 0 var(--spacing-md);
    }
    
    .footer-links {
        justify-content: center;
    }
}

/* Small Mobile - 480px and below */
@media (max-width: 480px) {
    :root {
        --font-size-h1: 24px;
        --font-size-h2: 20px;
        --spacing-md: 12px;
        --spacing-lg: 16px;
        --spacing-xl: 20px;
        --spacing-xxl: 30px;
    }
    
    .hero-title {
        font-size: 24px;
    }
    
    .hero-text {
        font-size: 14px;
        margin-bottom: var(--spacing-lg);
    }
    
    .section-title {
        font-size: 24px;
    }
    
    .section-subtitle {
        font-size: var(--font-size-base);
    }
    
    .carousel-container {
        padding: 0 32px;
    }
    
    .carousel-slide {
        flex: 0 0 100%;
        min-width: 100%;
        max-width: 100%;
    }
    
    .carousel-slide img {
        height: 250px;
        min-height: 200px;
        max-height: 280px;
        border-radius: var(--radius-md);
        object-fit: cover;
    }
    
    .carousel-btn {
        width: 32px;
        height: 32px;
    }
    
    .carousel-btn svg {
        width: 16px;
        height: 16px;
    }
    
    .carousel-btn-prev {
        left: 8px;
    }
    
    .carousel-btn-next {
        right: 8px;
    }
    
    .feature-icon {
        font-size: 36px;
    }
    
    .submit-button {
        padding: var(--spacing-sm) var(--spacing-md);
    }
}

/* Extra small devices - 360px and below */
@media (max-width: 360px) {
    .carousel-container {
        padding: 0 28px;
    }
    
    .carousel-slide img {
        height: 220px;
        min-height: 180px;
        border-radius: var(--radius-sm);
    }
    
    .carousel-btn {
        width: 30px;
        height: 30px;
    }
    
    .carousel-btn svg {
        width: 14px;
        height: 14px;
    }
    
    .carousel-dots {
        gap: 6px;
        margin-top: var(--spacing-sm);
    }
    
    .carousel-dot {
        width: 6px;
        height: 6px;
    }
}

/* Touch device optimizations */
@media (hover: none) and (pointer: coarse) {
    /* Increase touch targets */
    .nav-link,
    .carousel-btn,
    button,
    a {
        min-height: 44px;
        min-width: 44px;
    }
    
    /* Remove hover effects */
    .nav-link:hover,
    .feature-item:hover,
    .carousel-btn:hover,
    .cta-button:hover,
    .submit-button:hover {
        transform: none;
    }
    
    .carousel-btn:hover {
        transform: translateY(-50%);
    }
    
    /* Add active states instead */
    .nav-link:active,
    .cta-button:active,
    .submit-button:active {
        transform: scale(0.95);
    }
    
    .carousel-btn:active {
        transform: translateY(-50%) scale(0.95);
    }
}

/* Landscape mobile devices */
@media (max-width: 768px) and (orientation: landscape) {
    .hero-section {
        height: auto;
        min-height: 100vh;
        padding: var(--spacing-xxl) 0;
    }
    
    section {
        min-height: auto;
    }
    
    .carousel-slide img {
        height: 280px;
        max-height: 60vh;
    }
}

/* High DPI displays */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .profile-image img {
        image-rendering: -webkit-optimize-contrast;
    }
}

/* Reduced motion preferences */
@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-video {
        display: none;
    }
    
    .status-dot {
        animation: none;
    }
}

/* Print styles */
@media print {
    .sidebar,
    .mobile-header,
    .hero-video,
    .carousel-btn,
    .carousel-dots,
    .contact-form,
    .footer {
        display: none;
    }
    
    .main-content {
        margin-left: 0;
        margin-top: 0;
    }
    
    section {
        page-break-inside: avoid;
    }
    
    body {
        background: white;
        color: black;
    }
}
