/* ================================================
   Angry Bird Films - Responsive Styles
   Mobile-First Approach
   ================================================ */

/* ================================================
   Base Mobile Styles (320px and up)
   These are the default styles
   ================================================ */

/* Mobile adjustments already in main.css */

/* ================================================
   Small Mobile Devices (max 480px)
   ================================================ */

@media (max-width: 480px) {
    :root {
        --spacing-md: 20px;
        --spacing-lg: 40px;
        --spacing-xl: 60px;
        --spacing-xxl: 80px;
    }

    /* Ensure no horizontal overflow */
    html, body {
        max-width: 100%;
        overflow-x: hidden;
    }

    body {
        font-size: 0.95rem;
    }

    .hero {
        height: 70vh;
        padding-bottom: 40px;
        min-height: 500px;
    }

    .hero-title {
        font-size: clamp(1.8rem, 8vw, 2.5rem);
        word-wrap: break-word;
        hyphens: auto;
    }

    .hero-subtitle {
        font-size: 1rem;
        word-wrap: break-word;
    }

    .cta-button {
        padding: 12px 30px;
        font-size: 0.95rem;
        white-space: nowrap;
    }

    .section-title {
        font-size: 1.8rem;
        word-wrap: break-word;
        padding: 0 10px;
    }

    .section-subtitle {
        font-size: 1rem;
        word-wrap: break-word;
        padding: 0 10px;
    }

    section {
        padding: 60px 0;
        overflow-x: hidden;
    }

    .container {
        padding: 0 20px;
        max-width: 100%;
        overflow-x: hidden;
    }

    /* Ensure all text content doesn't overflow */
    p, h1, h2, h3, h4, h5, h6, a, span, li {
        word-wrap: break-word;
        overflow-wrap: break-word;
    }

    /* Testimonials - Small Mobile */
    .testimonials-title {
        font-size: 1.75rem;
        padding: 0 10px;
    }

    .testimonial-carousel {
        padding: 0 50px;
    }

    .testimonial-card {
        padding: 30px 20px;
    }

    .testimonial-quote {
        font-size: 0.95rem;
        line-height: 1.5;
    }

    .carousel-btn {
        width: 40px;
        height: 40px;
    }

    .carousel-btn svg {
        width: 18px;
        height: 18px;
    }

    .testimonial-avatar-wrapper {
        width: 70px;
        height: 70px;
        margin-bottom: 18px;
    }

    .star {
        font-size: 1.1rem;
    }

    .star-rating {
        gap: 4px;
        margin-bottom: 20px;
    }

    .client-name {
        font-size: 0.95rem;
    }

    .client-title {
        font-size: 0.8rem;
    }

    .carousel-indicators {
        margin-top: 30px;
        gap: 10px;
    }

    .indicator-dot {
        width: 10px;
        height: 10px;
    }

    /* Video Popup - Mobile */
    .video-popup-info {
        padding: 0 10px;
    }

    /* Video Popup - Small Mobile */
    .video-popup-content {
        width: 95%;
        gap: 15px;
    }

    .video-popup-close {
        top: -45px;
        width: 36px;
        height: 36px;
    }

    #popupVideo {
        max-height: 60vh;
    }

    .video-popup-controls {
        padding: 30px 15px 12px;
        gap: 10px;
    }

    .popup-play-pause,
    .popup-fullscreen {
        width: 32px;
        height: 32px;
    }

    .popup-play-pause svg,
    .popup-fullscreen svg {
        width: 16px;
        height: 16px;
    }

    .popup-time-display {
        font-size: 0.75rem;
    }

    .video-popup-title {
        font-size: 1.25rem;
    }

    .video-popup-category {
        font-size: 0.85rem;
    }
}

/* ================================================
   New Testimonial Layout - Responsive
   ================================================ */
@media (max-width: 992px) {
    .testimonial-frame {
        grid-template-columns: 1fr;
        gap: 18px;
    }
    .testimonial-panel {
        margin-left: 0;
    }
    /* removed .testimonial-next-cta */
}

@media (max-width: 600px) {
    .testimonial-visual { padding-top: 66%; }
    .testimonial-brand { width: 28px; height: 28px; }
    .testimonial-panel { padding: 22px; }
}

/* Ensure only one visible on small screens and remove side padding */
@media (max-width: 768px) {
  .testimonial-carousel-wrapper { padding: 0 12px; overflow: hidden; }
  .testimonial-carousel { padding: 0; }
  .testimonial-slide { opacity: 0; transition: opacity .35s ease; }
  .testimonial-slide.active { opacity: 1; }
}

/* ================================================
   Mobile & Small Tablets (max 767px)
   ================================================ */

@media (max-width: 767px) {
    /* Prevent horizontal scrolling on mobile */
    html, body {
        max-width: 100vw;
        overflow-x: hidden;
    }

    body {
        font-size: 1rem;
    }

    * {
        max-width: 100%;
    }

    /* Navigation Mobile Styles */
    .hamburger {
        display: flex;
        z-index: 10001;
        position: relative;
    }

    .hamburger.active span:nth-child(1) {
        transform: rotate(45deg) translate(8px, 8px);
    }

    .hamburger.active span:nth-child(2) {
        opacity: 0;
    }

    .hamburger.active span:nth-child(3) {
        transform: rotate(-45deg) translate(7px, -7px);
    }

    .nav-links {
        position: fixed;
        top: 0;
        right: -100%;
        height: 100vh;
        width: 280px;
        background: var(--dark);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 2.5rem;
        transition: right 0.4s ease;
        box-shadow: -5px 0 15px rgba(0, 0, 0, 0.3);
        z-index: 10000;
    }

    .nav-links.active {
        right: 0;
    }

    .nav-links a {
        font-size: 1.3rem;
    }

    /* Hero Section Mobile */
    .hero {
        height: 70vh;
        padding-bottom: 40px;
        min-height: 500px;
        overflow: hidden;
    }

    .hero-content {
        padding: 0 20px;
        max-width: 100%;
        box-sizing: border-box;
    }

    .hero-title {
        word-wrap: break-word;
        overflow-wrap: break-word;
        hyphens: auto;
    }

    .hero-subtitle {
        word-wrap: break-word;
        overflow-wrap: break-word;
    }

    /* Ensure video is visible on mobile with poster as fallback */
    .video-background {
        background-image: url('../images/hero-poster.jpg');
        background-size: cover;
        background-position: center;
    }

    .video-background video {
        display: block !important;
        opacity: 1;
    }

    /* Services Grid - Single Column */
    .services-grid {
        grid-template-columns: 1fr;
        gap: 30px;
        max-width: 100%;
    }

    .service-card {
        padding: var(--spacing-md);
        width: 100%;
        box-sizing: border-box;
        overflow-wrap: break-word;
    }

    .service-icon {
        width: 56px;
        height: 56px;
        flex-shrink: 0;
    }

    .service-icon svg {
        width: 28px;
        height: 28px;
    }

    .service-card h3 {
        font-size: 1.3rem;
        word-wrap: break-word;
        overflow-wrap: break-word;
    }

    .service-card p {
        word-wrap: break-word;
        overflow-wrap: break-word;
    }

    .services-cta {
        padding: var(--spacing-md);
        width: 100%;
        box-sizing: border-box;
    }

    .services-cta h2 {
        font-size: 1.5rem;
        word-wrap: break-word;
    }

    .services-cta p {
        word-wrap: break-word;
    }

    .services-cta-buttons {
        flex-direction: column;
        width: 100%;
    }

    .cta-button,
    .cta-button-outline,
    .cta-button-secondary {
        width: 100%;
        max-width: 100%;
        text-align: center;
        box-sizing: border-box;
        display: block;
    }

    /* CTA Section - Stack Vertically */
    .cta-grid {
        grid-template-columns: 1fr;
        gap: 30px;
        max-width: 100%;
    }

    .cta-content {
        order: 1;
        padding: 0 20px;
        box-sizing: border-box;
        width: 100%;
    }

    .cta-content h2 {
        word-wrap: break-word;
        overflow-wrap: break-word;
    }

    .cta-content p {
        word-wrap: break-word;
        overflow-wrap: break-word;
    }

    .cta-image {
        order: 2;
        width: 100%;
        overflow: hidden;
    }

    .cta-image img {
        max-height: 400px;
        object-fit: cover;
        width: 100%;
        height: auto;
    }

    /* Portfolio - Single Column */
    .portfolio-grid {
        grid-template-columns: 1fr;
        gap: 20px;
        max-width: 100%;
        width: 100%;
    }

    .portfolio-item {
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
    }

    .portfolio-filters {
        gap: 0.5rem;
        flex-wrap: wrap;
        justify-content: center;
        padding: 0 10px;
    }

    .filter-btn {
        padding: 8px 16px;
        font-size: 0.9rem;
        white-space: nowrap;
    }

    /* Testimonials Carousel - Mobile */
    .testimonial-carousel-wrapper {
        padding: 0 45px;
        max-width: 100%;
    }

    .testimonial-card {
        padding: 30px 20px 25px 20px;
    }

    .testimonial-card::before {
        font-size: 50px;
        top: 10px;
    }

    .testimonial-text {
        font-size: 0.95rem;
        line-height: 1.65;
    }

    .testimonial-footer {
        flex-direction: column;
        gap: 12px;
        padding-top: 20px;
    }

    .testimonial-avatar {
        width: 40px;
        height: 40px;
    }

    .testimonial-client-info {
        text-align: center;
    }

    .testimonial-name {
        font-size: 0.9rem;
    }

    .testimonial-role {
        font-size: 0.75rem;
    }

    .testimonial-nav {
        width: 38px;
        height: 38px;
    }

    .testimonial-nav svg {
        width: 18px;
        height: 18px;
    }

    .testimonial-dots {
        margin-top: 28px;
        gap: 8px;
    }

    .testimonial-dot {
        width: 8px;
        height: 8px;
    }

    /* About Section - Stack */
    .about-grid {
        grid-template-columns: 1fr;
        gap: 30px;
        max-width: 100%;
    }

    .about-image {
        order: 1;
        width: 100%;
    }

    .about-image img {
        width: 100%;
        height: auto;
    }

    .about-content {
        order: 2;
        width: 100%;
        box-sizing: border-box;
        word-wrap: break-word;
    }

    .about-content h2,
    .about-content p {
        word-wrap: break-word;
        overflow-wrap: break-word;
    }

    .about-stats,
    .stats-grid {
        grid-template-columns: 1fr;
        gap: 20px;
        width: 100%;
    }

    .stat-item {
        word-wrap: break-word;
    }

    .stat-number {
        font-size: 2rem;
    }

    /* Pricing - Single Column */
    .pricing-grid {
        grid-template-columns: 1fr;
        gap: 30px;
        max-width: 100%;
        width: 100%;
    }

    .pricing-card {
        padding: 30px 20px;
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
        word-wrap: break-word;
    }

    .pricing-card h3,
    .pricing-card p,
    .pricing-card li,
    .package-name,
    .feature-item {
        word-wrap: break-word;
        overflow-wrap: break-word;
    }

    .pricing-cta {
        width: 100%;
    }

    .pricing-cta .cta-button,
    .pricing-cta .cta-button-secondary {
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
        margin: 5px 0;
    }

    /* Equipment - Single Column */
    .equipment-grid {
        grid-template-columns: 1fr;
        gap: 25px;
        max-width: 100%;
    }

    .equipment-card {
        padding: 30px 25px;
    }

    .equipment-icon {
        font-size: 2.5rem;
        margin-bottom: 15px;
    }

    .equipment-title {
        font-size: 1.25rem;
    }

    .equipment-subtitle {
        font-size: 0.9rem;
        margin-bottom: 20px;
    }

    .equipment-features li {
        font-size: 0.9rem;
        margin-bottom: 12px;
    }

    /* Testimonials Carousel - Tablet */
    .testimonial-carousel-wrapper {
        padding: 0 55px;
        max-width: 680px;
    }

    .testimonial-card {
        padding: 32px 28px 28px 28px;
    }

    .testimonial-card::before {
        font-size: 55px;
        top: 12px;
    }

    .testimonial-text {
        font-size: 0.98rem;
        line-height: 1.68;
    }

    .testimonial-footer {
        flex-direction: row;
        padding-top: 20px;
    }

    .testimonial-avatar {
        width: 42px;
        height: 42px;
    }

    .testimonial-client-info {
        text-align: left;
    }

    .testimonial-name {
        font-size: 0.92rem;
    }

    .testimonial-role {
        font-size: 0.78rem;
    }

    .testimonial-nav {
        width: 42px;
        height: 42px;
    }

    .testimonial-nav svg {
        width: 20px;
        height: 20px;
    }

    /* Map Section - Adjust Height */
    .map-container {
        width: 100%;
        max-width: 100%;
        overflow: hidden;
    }

    .map-container iframe {
        height: 350px;
        width: 100%;
        max-width: 100%;
    }

    /* Contact - Stack */
    .contact-grid {
        grid-template-columns: 1fr;
        gap: 30px;
        max-width: 100%;
    }

    .contact-form,
    .contact-form-container {
        order: 1;
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
    }

    .form-group {
        width: 100%;
        max-width: 100%;
    }

    .form-group input,
    .form-group select,
    .form-group textarea {
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
    }

    .contact-info {
        order: 2;
        width: 100%;
        box-sizing: border-box;
        word-wrap: break-word;
    }

    .info-item {
        word-wrap: break-word;
        overflow-wrap: break-word;
    }

    .booking-steps {
        width: 100%;
        box-sizing: border-box;
    }

    /* Footer - Single Column */
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 30px;
        text-align: center;
        max-width: 100%;
        width: 100%;
    }

    .footer-column {
        width: 100%;
        box-sizing: border-box;
        word-wrap: break-word;
    }

    .footer-column h3,
    .footer-column h4,
    .footer-column p,
    .footer-column a {
        word-wrap: break-word;
        overflow-wrap: break-word;
    }

    .footer-logo {
        max-width: 200px;
        height: auto;
        margin: 0 auto;
    }

    .social-links,
    .social-icons {
        justify-content: center;
        flex-wrap: wrap;
    }

    /* Back to Top Button - Smaller */
    .back-to-top {
        width: 45px;
        height: 45px;
        font-size: 1.3rem;
        bottom: 20px;
        right: 20px;
    }

    /* Additional overflow prevention for all sections */
    section {
        max-width: 100vw;
        overflow-x: hidden;
    }

    .container {
        max-width: 100%;
        overflow-x: hidden;
    }

    img, video, iframe {
        max-width: 100%;
        height: auto;
    }

    table {
        width: 100%;
        max-width: 100%;
        overflow-x: auto;
        display: block;
    }
}

/* ================================================
   Tablet Portrait (768px - 1023px)
   ================================================ */

@media (min-width: 768px) and (max-width: 1023px) {
    /* Navigation stays full on tablets */
    .nav-links {
        gap: 1.5rem;
    }

    .nav-links a {
        font-size: 0.95rem;
    }

    /* Hero adjustments */
    .hero {
        height: 85vh;
    }

    /* Services Grid - 2 Columns */
    .services-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 30px;
    }

    /* Portfolio - 2 Columns */
    .portfolio-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 25px;
    }

    /* Testimonials Carousel - Tablet Portrait */
    .testimonial-carousel-wrapper {
        padding: 0 58px;
        max-width: 720px;
    }

    .testimonial-avatar {
        width: 44px;
        height: 44px;
    }

    /* Pricing - 2 Columns (featured card can span) */
    .pricing-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    /* Equipment - 2 Columns */
    .equipment-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    /* Footer - 2 Columns */
    .footer-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* ================================================
   Tablet Landscape & Small Desktop (1024px - 1365px)
   ================================================ */

@media (min-width: 1024px) and (max-width: 1365px) {
    .container {
        max-width: 1200px;
    }

    /* Services Grid - 3 or 4 columns depending on space */
    .services-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    /* Portfolio - 3 Columns */
    .portfolio-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    /* Pricing maintains 3 columns */
    .pricing-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* ================================================
   Desktop (1024px and up)
   ================================================ */

@media (min-width: 1024px) {
    /* Ensure proper grid layouts */
    .services-grid {
        grid-template-columns: repeat(4, 1fr);
    }

    /* Hover effects are more prominent on desktop */
    .service-card:hover {
        transform: translateY(-15px);
    }

    .portfolio-item:hover img {
        transform: scale(1.15);
    }

    /* Larger spacing */
    section {
        padding: 120px 0;
    }
}

/* ================================================
   Large Desktop (1440px and up)
   ================================================ */

@media (min-width: 1440px) {
    :root {
        --max-width: 1400px;
        --font-base: 1.125rem;
    }

    .hero-title {
        font-size: 4.5rem;
    }

    .hero-subtitle {
        font-size: 1.5rem;
    }

    .section-title {
        font-size: 3.5rem;
    }

    /* Portfolio can go 4 columns */
    .portfolio-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* ================================================
   Ultra-Wide Monitors (1920px and up)
   ================================================ */

@media (min-width: 1920px) {
    :root {
        --max-width: 1600px;
    }

    .container {
        max-width: 1600px;
    }
}

/* ================================================
   Touch Device Optimizations
   ================================================ */

@media (hover: none) and (pointer: coarse) {
    /* Larger touch targets */
    .cta-button,
    button[type="submit"] {
        min-height: 44px;
        min-width: 44px;
    }

    .nav-links a {
        padding: 10px 15px;
    }

    .filter-btn {
        min-height: 44px;
        padding: 10px 20px;
    }

    /* Remove hover effects on touch devices */
    .service-card:hover {
        transform: none;
    }

    .portfolio-item:hover img {
        transform: none;
    }

    .pricing-card:hover {
        transform: none;
    }

    /* Show portfolio overlay by default on mobile */
    .portfolio-overlay {
        opacity: 0.9;
        background: linear-gradient(to bottom, transparent, rgba(28, 26, 30, 0.9));
        justify-content: flex-end;
        padding-bottom: 20px;
    }
}

/* ================================================
   Print Styles
   ================================================ */

@media print {
    .navbar,
    .hamburger,
    .back-to-top,
    .video-background,
    footer {
        display: none;
    }

    body {
        font-size: 12pt;
        color: black;
    }

    a {
        color: black;
        text-decoration: underline;
    }

    section {
        page-break-inside: avoid;
        padding: 20px 0;
    }
}

/* ================================================
   Reduced Motion Preferences
   ================================================ */

@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }

    .video-background video {
        display: none;
    }
}

/* ================================================
   High Contrast Mode
   ================================================ */

@media (prefers-contrast: high) {
    :root {
        --gold: #ffd700;
        --dark: #000000;
        --white: #ffffff;
    }

    .service-card,
    .pricing-card,
    .testimonial-card {
        border: 2px solid var(--dark);
    }
}

/* ================================================
   Dark Mode Support
   ================================================ */

@media (prefers-color-scheme: dark) {
    /* Optional: Add dark mode styles if desired */
    /* Currently the site uses a dark hero with light sections */
    /* which provides good contrast in both modes */
}

/* ================================================
   BTS Video Section Responsive
   ================================================ */

@media (max-width: 767px) {
    .play-button-overlay {
        width: 60px;
        height: 60px;
    }

    .play-button-overlay::after {
        border-left-width: 18px;
        border-top-width: 11px;
        border-bottom-width: 11px;
    }

    .bts-video-section h3 {
        font-size: 1.5rem;
    }
}
@media (max-width: 480px) {
  .testimonial-visual.portrait { padding-top: 140%; }
  .testimonial-panel .testimonial-quote { font-size: 0.98rem; line-height: 1.6; }
}
@media (min-width: 993px) {
  .testimonial-dots { margin-top: 28px; }
}
