/* =================================================================
   YU Events — Comprehensive Responsive Stylesheet
   Consolidates mobile overrides for all page-specific inline styles.
   Loaded after style.css and animations.css.
   =================================================================
   Breakpoints (matching style.css):
   - 992px : Tablet
   - 768px : Mobile
   - 480px : Small mobile
   ================================================================= */

/* =================================================================
   GLOBAL RESPONSIVE UTILITIES
   ================================================================= */

/* Prevent horizontal overflow on all pages */
html, body {
  overflow-x: hidden;
  max-width: 100vw;
}

/* Full-bleed sections should not cause overflow */
.portfolio-grid,
.portfolio-masonry,
.craft-gallery {
  max-width: 100vw;
  overflow: hidden;
}

/* Touch-friendly links for mobile */
@media (max-width: 992px) {
  .editorial-link,
  .btn-editorial {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
  }
}

/* =================================================================
   HOMEPAGE (index.php)
   ================================================================= */

@media (max-width: 992px) {
  /* Hero */
  .page-home .hero {
    min-height: 500px;
  }

  .page-home .hero__content {
    padding: 1.5rem;
    max-width: 100%;
  }

  .page-home .hero__tagline {
    font-size: clamp(2rem, 6vw, 3rem);
    letter-spacing: 0.05em;
    margin-bottom: 1.5rem;
  }

  /* Portfolio Grid */
  .portfolio-grid {
    grid-template-columns: 1fr 1fr;
    grid-auto-rows: 40vw;
  }

  .project-card:nth-child(1) {
    grid-column: 1 / 3;
    grid-row: auto;
  }
  .project-card:nth-child(2) { grid-column: 1 / 3; }
  .project-card:nth-child(3) { grid-column: 1 / 2; }
  .project-card:nth-child(4) { grid-column: 2 / 3; }

  .project-card__overlay {
    padding: 2rem;
  }

  .project-card__title {
    font-size: clamp(1.2rem, 2.5vw, 1.8rem);
  }

  /* Services Overview */
  .page-home [style*="grid-template-columns: 1fr"] {
    gap: 3rem;
  }

  /* Journal Preview */
  .journal-preview {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }

  .journal-card__title {
    font-size: 1.5rem;
  }

  /* CTA Section — fix iOS parallax bug */
  .cta-section {
    background-attachment: scroll !important;
  }

  /* Founders strip */
  .page-home section[style*="height: 90vh"] {
    height: 60vh !important;
    min-height: 350px;
  }
}

@media (max-width: 768px) {
  .page-home .hero__tagline {
    font-size: clamp(1.8rem, 7vw, 2.5rem);
    letter-spacing: 0.03em;
  }

  .portfolio-grid {
    grid-template-columns: 1fr;
    grid-auto-rows: auto;
  }

  .project-card:nth-child(n) {
    grid-column: 1 / -1;
    grid-row: auto;
    aspect-ratio: 4/5;
  }

  .project-card__overlay {
    padding: 1.5rem;
  }

  .project-card__title {
    font-size: 1.3rem;
  }

  .project-card__cat {
    font-size: 0.65rem;
  }

  /* Studio intro section */
  .page-home .section.container[style*="text-align: center"] p[style*="font-size: 1.5rem"] {
    font-size: 1.15rem !important;
    line-height: 1.6 !important;
  }

  /* Journal Preview */
  .journal-preview {
    grid-template-columns: 1fr;
  }

  .journal-card__title {
    font-size: 1.3rem;
  }

  /* CTA */
  .cta-section {
    padding: var(--space-xl) 0;
  }
}

@media (max-width: 480px) {
  .page-home .hero__tagline {
    font-size: clamp(1.5rem, 8vw, 2rem);
  }

  .project-card:nth-child(n) {
    aspect-ratio: 3/4;
  }

  .project-card__overlay {
    padding: 1.2rem;
  }
}


/* =================================================================
   ABOUT PAGE (about.php)
   ================================================================= */

@media (max-width: 992px) {
  .about-hero {
    padding-top: calc(var(--header-height) + var(--space-xl));
  }

  .about-hero p {
    font-size: clamp(1rem, 2.5vw, 1.5rem);
    padding: 0 1rem;
  }

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

  .founder-card:first-child {
    border-right: none;
    border-bottom: 1px solid var(--c-black);
  }

  .founder-card {
    padding: 3rem 1.5rem;
  }

  .founder-card h3 {
    font-size: 2.2rem;
  }

  .values-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .bleed-img {
    height: 50vh;
    min-height: 300px;
  }
}

@media (max-width: 768px) {
  .about-hero h1 {
    font-size: clamp(2.2rem, 8vw, 3.5rem);
    padding: 0 0.5rem;
  }

  .founder-card {
    padding: 2.5rem 1rem;
  }

  .founder-card h3 {
    font-size: 2rem;
  }

  .founder-card p {
    font-size: 1rem;
  }

  .story-content {
    font-size: 1.05rem;
    padding: 0 0.5rem;
  }

  .value-card h4 {
    font-size: 1.5rem;
  }

  .bleed-img {
    height: 40vh;
    min-height: 250px;
  }
}


/* =================================================================
   SERVICES PAGE (services.php)
   ================================================================= */

@media (max-width: 992px) {
  .services-header {
    padding-top: calc(var(--header-height) + var(--space-xl));
  }

  .service-block {
    grid-template-columns: 1fr;
    gap: 2.5rem;
    padding: var(--space-lg) 0;
    text-align: center;
  }

  .service-block:nth-child(even) .service-block__img { order: 1; }
  .service-block:nth-child(even) .service-block__content {
    order: 2;
    padding-right: 0;
    padding-left: 0;
  }

  .service-block__content {
    padding-left: 0;
  }

  .service-block h2 {
    font-size: clamp(2rem, 5vw, 3rem);
  }

  .service-block p {
    font-size: 1.1rem;
  }

  .service-block__img img {
    aspect-ratio: 16/10;
  }
}

@media (max-width: 768px) {
  .services-header h1 {
    font-size: clamp(2.5rem, 8vw, 4rem);
  }

  .service-block {
    gap: 2rem;
  }

  .service-block h2 {
    font-size: clamp(1.8rem, 6vw, 2.5rem);
  }

  .service-block p {
    font-size: 1rem;
    margin-bottom: 1.5rem;
  }
}


/* =================================================================
   PORTFOLIO PAGE (portfolio.php)
   ================================================================= */

@media (max-width: 992px) {
  .portfolio-header {
    padding-top: calc(var(--header-height) + var(--space-xl));
  }

  .portfolio-masonry {
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  }

  .filters {
    gap: 0.8rem 1.5rem;
    margin-bottom: 2.5rem;
  }

  .filter-btn {
    font-size: 0.7rem;
    padding: 0.5rem 0.3rem;
  }

  .portfolio-item__overlay {
    padding: 1.5rem;
  }

  .portfolio-item h3 {
    font-size: clamp(1.2rem, 3vw, 1.8rem);
  }
}

@media (max-width: 768px) {
  .portfolio-masonry {
    grid-template-columns: 1fr;
  }

  .portfolio-item {
    aspect-ratio: 4/5;
  }

  .filters {
    gap: 0.5rem 1rem;
    padding: 0 0.5rem;
    justify-content: center;
  }

  .filter-btn {
    font-size: 0.65rem;
    min-height: 40px;
    padding: 0.5rem 0.5rem;
  }
}

@media (max-width: 480px) {
  .portfolio-item {
    aspect-ratio: 3/4;
  }

  .portfolio-item__overlay {
    padding: 1.2rem;
  }
}


/* =================================================================
   CONTACT PAGE (contact.php)
   ================================================================= */

@media (max-width: 992px) {
  .contact-hero {
    padding-top: calc(var(--header-height) + var(--space-lg));
  }

  .contact-postcard__card {
    grid-template-columns: 1fr;
  }

  .contact-postcard__divider {
    width: 100%;
    height: 2px;
  }

  .contact-postcard__left,
  .contact-postcard__right {
    padding: 2rem 1.5rem;
  }

  .pc-form .form-grid {
    grid-template-columns: 1fr;
  }

  .contact-postcard__stamp {
    width: 80px;
    height: 95px;
  }

  .contact-postcard__stamp img {
    width: 68px;
  }

  .contact-postcard__postmark {
    display: none;
  }

  .map-section__inner {
    height: 280px;
  }

  /* Submit button thumb-friendly */
  .pc-form__submit {
    min-height: 48px;
    padding: 0.9rem 2rem;
    width: 100%;
    justify-content: center;
  }
}

@media (max-width: 768px) {
  .contact-hero h1 {
    font-size: clamp(2rem, 7vw, 3rem);
  }

  .contact-postcard__left,
  .contact-postcard__right {
    padding: 1.5rem 1.2rem;
  }

  .contact-postcard__header {
    margin-bottom: 1.5rem;
  }

  .contact-postcard__line a,
  .contact-postcard__line span {
    font-size: 0.9rem;
  }

  .contact-postcard__pin-boxes span {
    width: 24px;
    height: 28px;
    font-size: 0.9rem;
  }

  .contact-postcard__social-link {
    width: 42px;
    height: 42px;
  }

  .map-section__inner {
    height: 220px;
  }

  /* Mobile form styling */
  .pc-form .form-control {
    font-size: 16px;
    padding: 0.6rem 0;
  }

  .pc-form textarea.form-control {
    min-height: 80px;
  }

  .pc-form .form-label {
    font-size: 0.55rem;
  }
}

@media (max-width: 480px) {
  .contact-postcard__left,
  .contact-postcard__right {
    padding: 1.2rem 1rem;
  }

  .contact-postcard__stamp {
    width: 65px;
    height: 80px;
  }

  .contact-postcard__stamp img {
    width: 55px;
  }

  .contact-postcard__left-head img {
    width: 40px;
  }

  .contact-postcard__left-head span {
    font-size: 1.1rem;
  }
}


/* =================================================================
   SERVICE DETAIL PAGE (service-detail.php)
   ================================================================= */

@media (max-width: 992px) {
  .service-hero {
    height: 70vh;
    min-height: 400px;
  }

  .service-hero h1 {
    font-size: clamp(2.5rem, 6vw, 4.5rem);
    padding: 0 1rem;
  }

  .service-hero p {
    font-size: clamp(1rem, 2vw, 1.4rem);
    padding: 0 1rem;
  }

  .editorial-block {
    grid-template-columns: 1fr;
    gap: 3rem;
    padding: var(--space-xl) var(--container-padding);
  }

  .editorial-block__img img {
    box-shadow: -15px 15px 0 var(--c-gold);
  }

  .editorial-block__watermark {
    font-size: 8rem;
    top: -5%;
    left: -5%;
  }

  .dynamic-gallery {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    padding: 2rem;
  }

  .dynamic-gallery img {
    aspect-ratio: 4/5;
    height: auto;
    border: none !important;
    margin: 0 !important;
  }

  .features-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .ethos-section {
    padding: var(--space-xl) var(--container-padding);
  }

  .ethos-section::before {
    font-size: 8rem;
  }
}

@media (max-width: 768px) {
  .service-hero {
    height: 60vh;
    min-height: 350px;
  }

  .service-hero h1 {
    font-size: clamp(2rem, 8vw, 3rem);
  }

  .editorial-block h2 {
    font-size: clamp(2rem, 6vw, 3rem);
  }

  .editorial-block p {
    font-size: 1rem;
    line-height: 1.7;
  }

  .editorial-block__img img {
    box-shadow: -10px 10px 0 var(--c-gold);
    aspect-ratio: 3/4;
  }

  .service-features {
    padding: var(--space-lg) var(--container-padding);
  }

  .service-features h3 {
    font-size: 2rem;
    margin-bottom: 2.5rem;
  }

  .feature-item {
    font-size: 1rem;
  }

  .inquiry-cta {
    padding: var(--space-xl) 0;
  }

  .inquiry-cta h2 {
    font-size: clamp(2rem, 6vw, 3rem);
  }

  .dynamic-gallery {
    padding: 1.5rem var(--container-padding);
  }
}


/* =================================================================
   PRODUCTION UNIT PAGE (production-unit.php)
   ================================================================= */

@media (max-width: 992px) {
  .prod-hero {
    height: 60vh;
    min-height: 350px;
  }

  .intro-text {
    font-size: clamp(1rem, 2.5vw, 1.5rem);
    padding: 0 var(--container-padding);
    margin: var(--space-xl) auto var(--space-lg);
  }

  .stats-grid {
    grid-template-columns: 1fr 1fr;
    gap: 3rem 2rem;
  }

  .stat-item .stat-number {
    font-size: 3rem;
  }

  .craft-gallery {
    grid-template-columns: 1fr;
  }

  .craft-text {
    padding: 3rem 2rem;
  }

  .craft-text h2 {
    font-size: 2.2rem;
  }
}

@media (max-width: 768px) {
  .prod-hero {
    height: 50vh;
    min-height: 300px;
  }

  .prod-hero h1 {
    font-size: clamp(2.5rem, 8vw, 4rem);
  }

  .stats-grid {
    gap: 2.5rem 1.5rem;
  }

  .stat-item .stat-number {
    font-size: 2.5rem;
  }

  .stat-item p {
    font-size: 0.7rem;
  }

  .craft-text {
    padding: 2.5rem 1.5rem;
  }

  .craft-text h2 {
    font-size: 1.8rem;
    margin-bottom: 1rem;
  }

  .craft-text p {
    font-size: 1rem;
    line-height: 1.6;
  }
}

@media (max-width: 480px) {
  .stats-grid {
    gap: 2rem 1rem;
  }

  .stat-item .stat-number {
    font-size: 2rem;
  }

  .craft-text {
    padding: 2rem 1.25rem;
  }
}


/* =================================================================
   BLOG / JOURNAL PAGE (blog.php)
   ================================================================= */

@media (max-width: 992px) {
  .journal-header {
    padding-top: calc(var(--header-height) + var(--space-xl));
  }

  .journal-grid {
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 2.5rem 1.5rem;
  }

  .journal-card__title {
    font-size: 1.4rem;
    line-height: 1.4;
  }

  .journal-card__excerpt {
    line-height: 1.6;
  }

  /* Featured post text breathing room */
  .journal-featured [style*="max-width:900px"] {
    padding: 0 0.5rem;
  }
}

@media (max-width: 768px) {
  .journal-grid {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }

  .journal-card__title {
    font-size: 1.3rem;
    line-height: 1.4;
  }

  .journal-card__excerpt {
    font-size: 0.95rem;
    line-height: 1.6;
  }

  /* Ensure journal card text has padding on mobile */
  .journal-card {
    padding: 0 0.25rem;
  }

  .journal-featured [style*="max-width:900px"] {
    padding: 0 0.75rem;
  }

  .pagination {
    margin-top: var(--space-lg);
  }

  .page-link {
    width: 44px;
    height: 44px;
  }
}


/* =================================================================
   BLOG DETAIL PAGE (blog-detail.php)
   ================================================================= */

@media (max-width: 768px) {
  .blog-hero {
    padding-top: calc(var(--header-height) + var(--space-lg));
  }

  .blog-body {
    font-size: 1rem;
    line-height: 1.7;
  }

  .blog-body img {
    margin: 1.5rem 0;
  }
}


/* =================================================================
   FAQ PAGE (faq.php)
   ================================================================= */

@media (max-width: 992px) {
  .faq-header {
    padding-top: calc(var(--header-height) + var(--space-xl));
  }
}

@media (max-width: 768px) {
  .faq-header h1 {
    font-size: clamp(2.5rem, 8vw, 4rem);
  }

  .faq-question {
    padding: 1.5rem 0;
    font-size: 1.1rem;
    gap: 1rem;
  }

  /* Larger touch target for accordion */
  .faq-icon {
    width: 24px;
    height: 24px;
    min-width: 24px;
  }

  .faq-icon::before { width: 24px; }
  .faq-icon::after { height: 24px; }

  .faq-answer__inner {
    font-size: 1rem;
    line-height: 1.7;
  }
}


/* =================================================================
   TESTIMONIALS PAGE (testimonials.php)
   ================================================================= */

@media (max-width: 992px) {
  .test-header {
    padding-top: calc(var(--header-height) + var(--space-xl));
  }

  .test-item {
    margin-bottom: 4rem;
  }

  .test-item blockquote {
    font-size: clamp(1.5rem, 4vw, 2.5rem);
    margin-bottom: 2rem;
  }

  .test-item hr {
    margin: 4rem auto 0;
    height: 40px;
  }
}

@media (max-width: 768px) {
  .test-header h1 {
    font-size: clamp(2.5rem, 8vw, 4rem);
  }

  .test-item blockquote {
    font-size: clamp(1.3rem, 5vw, 2rem);
    line-height: 1.5;
    padding: 0 0.5rem;
  }

  .test-item .client {
    font-size: 0.8rem;
  }

  .test-item .event {
    font-size: 1rem;
  }

  .test-item {
    margin-bottom: 3rem;
  }

  .test-item hr {
    margin: 3rem auto 0;
    height: 30px;
  }
}


/* =================================================================
   CELEBRATIONS PAGE (celebrations.php)
   ================================================================= */

@media (max-width: 992px) {
  .celeb-header {
    padding-top: calc(var(--header-height) + var(--space-xl));
  }

  .celeb-block {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .celeb-block:nth-child(even) .celeb-block__img { order: 0; }
  .celeb-block:nth-child(even) .celeb-block__text { order: 0; }

  .celeb-block__title {
    font-size: clamp(1.8rem, 5vw, 2.5rem);
  }
}

@media (max-width: 768px) {
  .celeb-header h1 {
    font-size: clamp(2.5rem, 8vw, 4rem);
  }

  .celeb-block {
    gap: 1.5rem;
    padding: var(--space-lg) 0;
  }

  .celeb-block__tagline {
    font-size: 0.65rem;
  }

  .celeb-block__title {
    font-size: clamp(1.5rem, 6vw, 2rem);
  }

  .celeb-block__desc {
    font-size: 1rem;
    line-height: 1.6;
  }

  .celeb-block__img img {
    aspect-ratio: 16/10;
  }
}


/* =================================================================
   EVENT DETAIL PAGE (event-detail.php)
   ================================================================= */

@media (max-width: 992px) {
  .event-hero {
    height: 60vh;
    min-height: 350px;
  }

  .event-content {
    padding: var(--space-lg) var(--container-padding);
  }

  .event-gallery-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
}

@media (max-width: 768px) {
  .event-hero {
    height: 50vh;
    min-height: 280px;
  }

  .event-hero h1 {
    font-size: clamp(2rem, 7vw, 3rem);
  }
}


/* =================================================================
   PORTFOLIO DETAIL PAGE (portfolio-detail.php)
   ================================================================= */

@media (max-width: 992px) {
  .project-hero {
    height: 60vh;
    min-height: 350px;
  }
}

@media (max-width: 768px) {
  .project-hero {
    height: 50vh;
    min-height: 280px;
  }

  .project-hero h1 {
    font-size: clamp(2rem, 7vw, 3rem);
  }

  .project-gallery-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
}


/* =================================================================
   BREADCRUMBS
   ================================================================= */

@media (max-width: 768px) {
  .breadcrumbs {
    padding-top: calc(var(--header-height) + 1rem);
  }

  .breadcrumbs__list {
    font-size: 0.6rem;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    flex-wrap: nowrap;
    white-space: nowrap;
    padding-bottom: 0.5rem;
    scrollbar-width: none;
    -ms-overflow-style: none;
  }

  .breadcrumbs__list::-webkit-scrollbar {
    display: none;
  }
}


/* =================================================================
   404 PAGE
   ================================================================= */

@media (max-width: 768px) {
  .page-404 .container {
    padding: calc(var(--header-height) + 2rem) var(--container-padding) 3rem;
  }
}


/* =================================================================
   PRIVACY, TERMS — Content Pages
   ================================================================= */

@media (max-width: 768px) {
  .page-privacy .content-area,
  .page-terms .content-area {
    padding-top: calc(var(--header-height) + var(--space-lg));
    font-size: 0.95rem;
    line-height: 1.7;
  }
}


/* =================================================================
   COMMON PAGE HEADER ADJUSTMENTS
   Reduce top padding consistently for compact mobile headers
   ================================================================= */

@media (max-width: 768px) {
  .about-hero,
  .services-header,
  .portfolio-header,
  .celeb-header,
  .faq-header,
  .test-header,
  .journal-header {
    padding-top: calc(var(--header-height) + var(--space-lg)) !important;
    padding-bottom: var(--space-md);
  }

  /* Reduce gold line height on mobile */
  .line-grow[style*="height: 80px"] {
    height: 50px !important;
  }
}

@media (max-width: 480px) {
  .about-hero,
  .services-header,
  .portfolio-header,
  .celeb-header,
  .faq-header,
  .test-header,
  .journal-header {
    padding-top: calc(var(--header-height) + var(--space-md)) !important;
  }
}


/* =================================================================
   iOS SAFE AREA SUPPORT
   ================================================================= */

@supports (padding-bottom: env(safe-area-inset-bottom)) {
  .footer__info {
    padding-bottom: env(safe-area-inset-bottom);
  }

  .whatsapp-float {
    bottom: calc(var(--postcard-total-offset) + 1rem + env(safe-area-inset-bottom));
  }

  .nav__mobile {
    padding-bottom: calc(60px + env(safe-area-inset-bottom));
  }
}
