/* ============================================
   RESPONSIVE CSS - Raynine Media Works
   Mobile-first responsive design
   ============================================ */

/* Prevent horizontal overflow globally */
html, body {
  overflow-x: hidden;
  max-width: 100vw;
}

/* ---------- Hamburger Menu Button ---------- */
.hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  width: 40px;
  height: 40px;
  cursor: pointer;
  z-index: 1500;
  background: none;
  border: none;
  padding: 5px;
  position: relative;
}

.hamburger span {
  display: block;
  width: 26px;
  height: 2.5px;
  background: #fff;
  border-radius: 3px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: absolute;
}

.hamburger span:nth-child(1) {
  top: 10px;
}

.hamburger span:nth-child(2) {
  top: 18px;
}

.hamburger span:nth-child(3) {
  top: 26px;
}

.hamburger.active span:nth-child(1) {
  top: 18px;
  transform: rotate(45deg);
}

.hamburger.active span:nth-child(2) {
  opacity: 0;
  transform: translateX(-10px);
}

.hamburger.active span:nth-child(3) {
  top: 18px;
  transform: rotate(-45deg);
}

/* ---------- Mobile Nav Overlay ---------- */
.mobile-nav-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
  z-index: 1100;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.mobile-nav-overlay.active {
  opacity: 1;
  visibility: visible;
}

/* ---------- Mobile Nav Menu ---------- */
.mobile-nav {
  position: fixed;
  top: 0;
  right: -100%;
  width: 280px;
  max-width: 80vw;
  height: 100vh;
  background: linear-gradient(180deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
  z-index: 1200;
  display: flex;
  flex-direction: column;
  padding: 100px 30px 40px;
  transition: right 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  overflow-y: auto;
  box-shadow: -5px 0 30px rgba(0, 0, 0, 0.3);
}

.mobile-nav.active {
  right: 0;
}

.mobile-nav a {
  display: block;
  color: #fff;
  text-decoration: none;
  font-size: 18px;
  font-weight: 500;
  padding: 16px 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  transition: all 0.3s ease;
  text-align: center;
  letter-spacing: 0.5px;
}

.mobile-nav a:hover,
.mobile-nav a.active {
  color: #ff4b4b;
  padding-left: 20px;
}

.mobile-nav .mobile-contact-btn {
  display: inline-block;
  margin-top: 30px;
  padding: 14px 30px;
  border: 1.5px solid #fff;
  border-radius: 30px;
  color: #fff;
  text-align: center;
  font-weight: 600;
  transition: all 0.3s ease;
}

.mobile-nav .mobile-contact-btn:hover {
  background: #fff;
  color: #1a1a2e;
}

/* ---------- Body scroll lock when menu open ---------- */
body.nav-open {
  overflow: hidden;
}

/* ============================================
   BREAKPOINT: 1200px (Large Desktops)
   ============================================ */
@media (max-width: 1200px) {
  /* Index page header */
  .header {
    padding: 20px 50px;
  }
  .header.scrolled {
    padding: 15px 50px;
  }

  /* About section */
  .about-left h2 {
    font-size: 44px;
  }

  /* Team collage */
  .team-collage {
    height: 400px;
  }
  .img1 { width: 280px; height: 320px; }
  .img2 { width: 250px; height: 190px; }
  .img3 { width: 230px; height: 270px; }
  .img4 { width: 240px; height: 190px; }
  .img5 { width: 220px; height: 170px; }

  /* Work page hero */
  .work-hero-left h1 {
    font-size: clamp(32px, 5vw, 70px);
  }

  /* Services page big heading */
  .big-heading {
    font-size: 64px;
  }
}

/* ============================================
   BREAKPOINT: 992px (Tablets Landscape)
   ============================================ */
@media (max-width: 992px) {
  /* Index page header */
  .header {
    padding: 18px 40px;
  }
  .header.scrolled {
    padding: 14px 40px;
  }

  /* Hero section */
  .hero h1 {
    font-size: 70px;
  }
  .hero-text {
    font-size: 3.5rem;
  }

  /* About section */
  .about-section {
    padding: 80px 6% 60px;
  }
  .about-container {
    flex-direction: column;
    gap: 30px;
  }
  .about-left {
    flex: 1 1 100%;
  }
  .about-left h2 {
    font-size: 40px;
  }
  .about-right {
    flex: 1 1 100%;
  }

  /* Team section */
  .team-collage {
    height: 350px;
  }
  .img1 { width: 240px; height: 280px; left: 5%; }
  .img2 { width: 220px; height: 170px; left: 35%; }
  .img3 { width: 200px; height: 240px; left: 60%; }
  .img4 { width: 210px; height: 170px; left: 20%; top: 280px; }
  .img5 { width: 190px; height: 150px; left: 50%; top: 260px; }

  /* Services grid */
  .services-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  /* Connection section */
  .connection-content {
    width: 92%;
    padding: 40px 30px;
  }
  .connection-content h2 {
    font-size: 2rem;
  }

  /* Footer */
  .site-footer {
    padding: 60px 30px 30px;
  }
  .footer-container {
    flex-direction: column;
    gap: 30px;
    align-items: flex-start;
  }
  .footer-bottom {
    position: static;
    text-align: center;
    margin-top: 30px;
  }

  /* About page */
  .about-main {
    padding: 80px 6%;
  }
  .big-title {
    font-size: 10vw;
  }
  .mission-vision-section {
    grid-template-columns: 1fr;
    padding: 80px 6%;
  }
  .mv-left {
    display: none;
  }

  /* Services page */
  .big-heading {
    font-size: 52px;
    margin-left: 6%;
  }
  .work-grid {
    gap: 50px;
    padding: 0 6% 80px 6%;
  }
  .img-wrap {
    height: 320px;
  }

  /* Work page */
  .work-hero {
    flex-direction: column;
    height: auto;
    min-height: 100vh;
    padding: 120px 6% 60px;
    text-align: center;
    gap: 40px;
  }
  .work-hero-right {
    margin-bottom: 0;
  }
  .projects-grid {
    gap: 36px;
  }
  .project-card img {
    height: 220px;
  }

  /* Contact page */
  .grid {
    grid-template-columns: 1fr;
  }
}

/* ============================================
   BREAKPOINT: 768px (Tablets Portrait)
   ============================================ */
@media (max-width: 768px) {
  /* Show hamburger, hide desktop nav */
  .hamburger {
    display: flex;
  }

  /* Index page - hide nav and contact btn */
  .header .nav {
    display: none;
  }
  .header .header-right {
    display: none;
  }

  /* About/Services page - hide nav and contact btn */
  .main-header .header-center {
    display: none;
  }
  .main-header .header-right {
    display: none;
  }

  /* Work page - hide nav and CTA */
  .main-header .nav {
    display: none;
  }
  .main-header .cta {
    display: none;
  }

  /* Contact page - hide nav and CTA */
  .header .nav {
    display: none;
  }
  .header .cta {
    display: none;
  }

  /* Header adjustments */
  .header {
    padding: 15px 20px;
  }
  .header.scrolled {
    padding: 12px 20px;
  }
  .main-header {
    padding: 15px 20px;
  }
  .main-header.scrolled {
    padding: 12px 20px;
  }

  /* Logo sizing */
  .logo img {
    width: 80px;
  }
  .logo-img {
    width: 90px;
    height: auto;
  }

  /* Hero section (index) */
  .hero {
    padding: 0 6%;
    height: 80vh;
  }
  .hero h1 {
    font-size: 48px;
  }
  .hero-text {
    font-size: 2.5rem;
  }

  /* Hero strip */
  .hero-strip {
    font-size: 14px;
    padding: 8px 5%;
  }

  /* About section (index) */
  .about-section {
    padding: 60px 5% 50px;
  }
  .about-left h2 {
    font-size: 32px;
  }
  .about-right p {
    font-size: 16px;
  }

  /* Scroll banner */
  .scroll-banner {
    height: 50vh;
  }

  /* Team section */
  .our-team-section {
    padding: 60px 0 120px;
  }
  .team-heading {
    font-size: 36px;
  }
  .team-subheading {
    font-size: 16px;
    padding: 0 20px;
  }
  .team-collage {
    width: 92%;
    height: 300px;
  }
  .img1 { width: 180px; height: 210px; left: 2%; top: 0; }
  .img2 { width: 160px; height: 130px; left: 38%; top: 30px; }
  .img3 { width: 150px; height: 180px; left: 60%; top: 100px; }
  .img4 { width: 160px; height: 130px; left: 15%; top: 220px; }
  .img5 { width: 140px; height: 120px; left: 50%; top: 220px; }

  /* Services section (index) */
  .services-section {
    padding: 60px 5%;
  }
  .section-title {
    font-size: 32px;
    margin-bottom: 35px;
  }
  .services-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  .service-card h3 {
    font-size: 20px;
  }

  /* Connection section (index) */
  .connection-section {
    padding: 50px 15px;
  }
  .connection-content {
    width: 95%;
    padding: 35px 20px;
  }
  .connection-content h2 {
    font-size: 1.6rem;
    margin-bottom: 30px;
  }
  .connection-columns {
    flex-direction: column;
    gap: 30px;
  }

  /* Site footer (index) */
  .site-footer {
    padding: 50px 20px 20px;
  }
  .footer-container {
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 30px;
  }
  .footer-right a {
    margin: 0 10px;
    display: inline-block;
    margin-bottom: 8px;
  }
  .footer-bottom {
    position: static;
    text-align: center;
    margin-top: 20px;
    padding-top: 15px;
  }

  /* About page hero */
  .about-hero {
    height: 70vh;
    padding: 0 20px;
  }
  .about-content h1 {
    font-size: 36px;
  }
  .about-content p {
    font-size: 13px;
  }

  /* About page main */
  .about-main {
    padding: 60px 5%;
  }
  .big-title {
    font-size: 12vw;
    margin-bottom: 30px;
  }
  .about-text p {
    font-size: 16px;
  }

  /* Mission/Vision */
  .mission-vision-section {
    padding: 60px 5%;
    grid-template-columns: 1fr;
  }
  .mv-heading {
    font-size: 12vw;
  }

  /* Contact section (about/services pages) */
  .contact-section {
    padding: 60px 15px;
  }
  .contact-box {
    width: 100%;
    padding: 40px 20px;
  }
  .contact-box h2 {
    font-size: 30px;
  }
  .contact-grid {
    flex-direction: column;
    text-align: center;
    gap: 30px;
  }

  /* Connect form */
  .connect-form {
    padding: 40px 15px;
  }
  .connect-form h2 {
    font-size: 24px;
    margin-bottom: 20px;
  }
  .connect-form input {
    width: 100%;
    max-width: 300px;
    margin-right: 0;
    margin-bottom: 15px;
  }

  /* Footer (about/services pages) */
  .footer-content {
    flex-direction: column;
    text-align: center;
    gap: 30px;
  }
  .footer-right ul {
    list-style: none;
  }

  /* Services page hero */
  .services-hero {
    height: 70vh;
  }
  .services-hero .hero-content h1 {
    font-size: 36px;
  }

  /* Services page big heading */
  .big-heading-section {
    padding: 80px 0 60px;
  }
  .big-heading {
    font-size: 38px;
    margin-left: 5%;
  }

  /* Services page work grid */
  .work-grid {
    grid-template-columns: 1fr;
    gap: 40px;
    padding: 0 5% 60px 5%;
  }
  .img-wrap {
    height: 260px;
  }
  .work-item h3 {
    font-size: 22px;
  }

  /* Work page */
  .work-hero {
    flex-direction: column;
    height: auto;
    min-height: 80vh;
    padding: 100px 5% 50px;
    text-align: center;
  }
  .work-hero-left h1 {
    font-size: 36px;
    text-align: center;
  }
  .hero-logo {
    width: 130px;
  }
  .logo-strip {
    padding: 24px 4%;
  }
  .logos {
    gap: 30px;
  }
  .logos img {
    height: 60px;
  }
  .projects-section {
    padding: 50px 5% 80px;
  }
  .projects-section h2 {
    font-size: 28px;
  }
  .projects-grid {
    grid-template-columns: 1fr;
    gap: 30px;
  }
  .project-card img {
    height: 200px;
  }

  /* Work page footer */
  .footer-section {
    padding: 50px 15px 0;
  }
  .footer-box {
    padding: 30px 20px;
  }
  .footer-box h2 {
    font-size: 26px;
  }

  /* Contact page */
  .container {
    padding: 20px 15px;
    margin: 30px auto;
  }
  .row {
    flex-direction: column;
  }
  .vertical-left,
  .vertical-right {
    display: none;
  }
  .map {
    height: 180px;
  }
}

/* ============================================
   BREAKPOINT: 576px (Mobile Phones)
   ============================================ */
@media (max-width: 576px) {
  /* Header */
  .header {
    padding: 12px 15px;
  }
  .header.scrolled {
    padding: 10px 15px;
  }
  .main-header {
    padding: 12px 15px;
  }
  .main-header.scrolled {
    padding: 10px 15px;
  }

  /* Logo */
  .logo img {
    width: 70px;
  }
  .logo-img {
    width: 75px;
    height: auto;
  }

  /* Hero (index) */
  .hero {
    height: 70vh;
    padding: 0 5%;
  }
  .hero h1 {
    font-size: 36px;
  }
  .hero-text {
    font-size: 2rem;
  }
  .hero-content {
    max-width: 100%;
  }

  /* Hero strip */
  .hero-strip {
    font-size: 12px;
    padding: 6px 3%;
  }
  .strip-item {
    margin-right: 30px;
  }

  /* About section (index) */
  .about-section {
    padding: 40px 4% 30px;
  }
  .about-left h2 {
    font-size: 26px;
    margin-top: 10px;
  }
  .about-right p {
    font-size: 15px;
    line-height: 1.6;
  }

  /* Scroll banner */
  .scroll-banner {
    height: 35vh;
  }
  .custom-cursor {
    display: none;
  }

  /* Team section */
  .our-team-section {
    padding: 40px 0 100px;
  }
  .team-heading {
    font-size: 28px;
  }
  .team-subheading {
    font-size: 14px;
    margin-bottom: 40px;
  }
  .team-collage {
    height: 250px;
  }
  .img1 { width: 140px; height: 170px; left: 2%; top: 0; }
  .img2 { width: 130px; height: 100px; left: 40%; top: 20px; }
  .img3 { width: 120px; height: 150px; left: 58%; top: 80px; }
  .img4 { width: 130px; height: 100px; left: 10%; top: 180px; }
  .img5 { width: 110px; height: 90px; left: 48%; top: 180px; }

  /* Services section (index) */
  .services-section {
    padding: 40px 4%;
  }
  .section-title {
    font-size: 26px;
    margin-bottom: 25px;
  }
  .service-card {
    padding: 20px;
  }
  .service-card h3 {
    font-size: 18px;
  }
  .service-card p {
    font-size: 14px;
  }

  /* Connection section */
  .connection-section {
    padding: 40px 10px;
  }
  .connection-content {
    padding: 25px 15px;
  }
  .connection-content h2 {
    font-size: 1.4rem;
    margin-bottom: 25px;
  }
  .connection-item h3 {
    font-size: 1.1rem;
  }
  .email-btn {
    padding: 8px 16px;
    font-size: 13px;
  }

  /* Footer (index) */
  .site-footer {
    padding: 40px 15px 15px;
  }
  .footer-right a {
    font-size: 14px;
    margin: 0 8px;
  }

  /* About page */
  .about-hero {
    height: 60vh;
  }
  .about-content h1 {
    font-size: 28px;
  }
  .about-main {
    padding: 40px 4%;
  }
  .big-title {
    font-size: 14vw;
    margin-bottom: 20px;
  }
  .about-text p {
    font-size: 15px;
    margin-bottom: 18px;
  }

  /* Mission/Vision */
  .mission-vision-section {
    padding: 40px 4%;
  }
  .mv-heading {
    font-size: 14vw;
    margin-bottom: 25px;
  }
  .mv-block h3 {
    font-size: 18px;
  }
  .mv-block p {
    font-size: 15px;
  }

  /* Contact section (about/services) */
  .contact-section {
    padding: 40px 10px;
  }
  .contact-box {
    padding: 30px 15px;
  }
  .contact-box h2 {
    font-size: 24px;
    margin-bottom: 25px;
  }

  /* Connect form */
  .connect-form {
    padding: 30px 10px;
  }
  .connect-form input {
    width: 100%;
    max-width: 260px;
  }
  .submit-btn {
    padding: 10px 24px;
  }

  /* Footer (about/services) */
  footer {
    padding: 50px 20px 15px;
  }

  /* Services page */
  .services-hero {
    height: 60vh;
  }
  .services-hero .hero-content h1 {
    font-size: 28px;
    padding: 0 10px;
  }
  .big-heading-section {
    padding: 50px 0 40px;
  }
  .big-heading {
    font-size: 30px;
    margin-left: 4%;
  }
  .work-grid {
    gap: 30px;
    padding: 0 4% 40px 4%;
  }
  .img-wrap {
    height: 220px;
  }
  .work-item h3 {
    font-size: 20px;
    margin-top: 14px;
  }
  .work-item p {
    font-size: 14px;
  }

  /* Work page */
  .work-hero {
    padding: 90px 4% 40px;
    min-height: 70vh;
  }
  .work-hero-left h1 {
    font-size: 28px;
  }
  .hero-logo {
    width: 100px;
  }
  .hero-plus {
    font-size: 28px;
  }
  .hero-partner {
    font-size: 15px;
  }
  .logo-strip {
    padding: 20px 3%;
  }
  .logos img {
    height: 45px;
  }
  .logos {
    gap: 24px;
  }
  .projects-section {
    padding: 40px 4% 60px;
  }
  .projects-section h2 {
    font-size: 24px;
    margin-bottom: 25px;
  }
  .project-card img {
    height: 180px;
  }
  .project-card h3 {
    font-size: 18px;
  }

  /* Work page footer */
  .footer-section {
    padding: 40px 10px 0;
  }
  .footer-box {
    padding: 25px 15px;
  }
  .footer-box h2 {
    font-size: 22px;
  }
  .footer-box p {
    font-size: 14px;
  }
  .footer-btn {
    padding: 10px 24px;
    font-size: 14px;
  }

  /* Contact page */
  .container {
    padding: 15px 10px;
    margin: 20px auto;
  }
  .section-title {
    font-size: 16px;
  }
  .info-card {
    padding: 12px;
  }
  .submit {
    width: 100%;
    text-align: center;
  }
  .map {
    height: 160px;
  }
}

/* ============================================
   GLOBAL RESPONSIVE HELPERS
   ============================================ */

/* Prevent horizontal overflow */
img {
  max-width: 100%;
  height: auto;
}

/* Make all buttons tap-friendly on mobile */
@media (max-width: 768px) {
  button, .contact-btn, .email-btn, .submit-btn, .cta, .footer-btn, .mobile-contact-btn {
    min-height: 44px;
    min-width: 44px;
  }
}

/* Overlay content responsive */
@media (max-width: 768px) {
  .overlay-content {
    padding: 30px 20px;
    max-width: 95%;
  }
  .overlay-content h2 {
    font-size: 22px;
  }
  .overlay-content p {
    font-size: 14px;
    line-height: 1.6;
  }
  .close-btn {
    top: 10px;
    right: 15px;
  }
}
