﻿/* ==========================================================================
   AbroadVibes – ENHANCED RESPONSIVE CSS (Desktop • Tablet • Mobile)
   ========================================================================== */

/* ===================== ROOT ===================== */
:root {
    --primary: #1e3a8a;
    --accent: #dc2626;
    --muted: #6b7280;
    --bg: #f3f4f6;
    --card: #ffffff;
    --dark: #111827;
    --success: #10b981;
    --danger: #ef4444;
}

/* ===================== PAGE LOADER ===================== */
/* ================= LOADER ================= */

#loader {
  position: fixed;
  inset: 0;
  background: #0f172a;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}

.logo {
  font-family: 'Inter', sans-serif;
  font-size: 3rem;
  font-weight: 800;
  color: #38bdf8;
  letter-spacing: 4px;
}

.logo span {
  display: inline-block;
  opacity: 0;
  transform: translateY(20px);
  animation: fadeMove 1.2s ease-in-out infinite;
}

.logo span:nth-child(n) {
  animation-delay: calc(var(--i) * 0.1s);
}

@keyframes fadeMove {
  0% { opacity: 0; transform: translateY(20px); }
  50% { opacity: 1; transform: translateY(0); }
  100% { opacity: 0; transform: translateY(-20px); }
}


@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}


/* ===================== RESET ===================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    width: 100%;
    overflow-x: hidden;
}

body {
    font-family: 'Inter', Arial, sans-serif;
    line-height: 1.6;
    color: #333;
    background: #fff;
}

/* ===================== COMMON ===================== */
a {
    text-decoration: none;
    color: inherit;
}

button {
    border: none;
    cursor: pointer;
    font-family: inherit;
}

.container {
    max-width: 1320px;
    margin: auto;
    padding: 0 clamp(1rem, 5vw, 5%);
}

section {
    padding: clamp(3rem, 6vw, 4.5rem) 0;
}

.section-header {
    text-align: center;
    margin-bottom: clamp(1.5rem, 4vw, 2.5rem);
}

.section-header h2 {
    font-size: clamp(1.5rem, 4vw, 2.3rem);
    color: var(--primary);
    margin-bottom: 0.5rem;
}

.section-header p {
    color: var(--muted);
    margin-top: 0.5rem;
    font-size: clamp(0.9rem, 2vw, 1rem);
}

/* ===================== NAVIGATION ===================== */
.main-nav {
    
    background: #fff;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 12px rgba(0,0,0,0.08);
}

.nav-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: clamp(0.75rem, 2vw, 1rem) 0;
    gap: 1rem;
}

.logo img {
    height: clamp(32px, 4vw, 46px);
    max-width: min(160px, 40vw);
    object-fit: contain;
}

.nav-menu {
    list-style: none;
    display: flex;
    gap: clamp(1rem, 3vw, 2rem);
    align-items: center;
}

.nav-menu a {
    font-weight: 500;
    position: relative;
    font-size: clamp(0.9rem, 1.5vw, 1rem);
    white-space: nowrap;
}

.nav-menu a::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: -6px;
    width: 0;
    height: 2px;
    background: var(--accent);
    transition: 0.3s;
}

.nav-menu a:hover::after {
    width: 100%;
}

.apply-btn {
    background: var(--accent);
    color: #fff;
    padding: clamp(0.5rem, 1.5vw, 0.65rem) clamp(1rem, 2.5vw, 1.5rem);
    border-radius: 6px;
    font-weight: 600;
    font-size: clamp(0.85rem, 1.5vw, 1rem);
    transition: background 0.3s;
}

.apply-btn:hover {
    background: #b91c1c;
}

/* Mobile Nav */
.nav-toggle {
    display: none;
    background: none;
    flex-direction: column;
    gap: 4px;
}

.nav-toggle .bar {
    width: 24px;
    height: 2px;
    background: var(--dark);
    transition: 0.3s;
}

/* ===================== HERO ===================== */
.hero-slider {
    height: clamp(400px, 90vh, 600px);
    position: relative;
}

.slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    transition: opacity 1s ease;
}

.slide.active {
    opacity: 1;
}

.slide1,
.slide2 {
    background-size: cover;
    background-position: center;
}

.slide1 {
    background-image:
        linear-gradient(rgba(30,58,138,0.55), rgba(30,58,138,0.55)),
        url('https://res.cloudinary.com/dzi2c0noo/image/upload/v1766153824/tokyouni_muqoul.jpg');
}

.slide2 {
    background-image:
        linear-gradient(rgba(30,58,138,0.45), rgba(30,58,138,0.45)),
        url('https://res.cloudinary.com/dzi2c0noo/image/upload/v1766153824/uni2_apsmmf.webp');
}

.slide-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    width: 90%;
    max-width: 850px;
    color: #fff;
    padding: 1rem;
}

.slide-content h1 {
    font-size: clamp(1.5rem, 8vw, 3.5rem);
    margin-bottom: clamp(0.75rem, 2vw, 1rem);
    line-height: 1.2;
    font-family: "DM Serif Display", serif;
}

.slide-content p {
    font-size: clamp(0.9rem, 2.5vw, 1.2rem);
    margin-bottom: clamp(1rem, 3vw, 1.6rem);
    line-height: 1.5;
}

.slider-btn {
    padding: clamp(0.7rem, 2vw, 0.9rem) clamp(1.2rem, 3vw, 2rem);
    border-radius: 6px;
    font-weight: 600;
    font-size: clamp(0.9rem, 2vw, 1rem);
    transition: transform 0.3s;
}

.slider-btn:hover {
    transform: scale(1.05);
}

/* ===================== WELCOME ===================== */
.welcome-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: clamp(2rem, 5vw, 3rem);
    align-items: center;
}

.welcome-grid h1 {
    color: var(--primary);
    font-size: clamp(1.5rem, 4vw, 2.5rem);
    margin-bottom: 0.5rem;
    line-height: 1.3;
    font-family: "DM Serif Display", serif;
}

.welcome-grid p {
    font-size: clamp(0.9rem, 2vw, 1rem);
    line-height: 1.7;
    margin-bottom: 1rem;
}

.welcome-image {
    width: 100%;
    height: auto;
    aspect-ratio: 4/3;
    max-height: 420px;
    border-radius: 12px;
    overflow: hidden;
}

.welcome-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* ===================== SCROLL IMAGE ===================== */
.scroll-container {
    display: flex;
    align-items: center;
    gap: clamp(8px, 2vw, 12px);
}

.image-scroll-wrapper {
    flex: 1;
    overflow-x: auto;
    white-space: nowrap;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
}

.image-scroll-wrapper::-webkit-scrollbar {
    display: none;
}

.scroll-image {
    height: clamp(180px, 35vw, 450px);
    border-radius: clamp(8px, 2vw, 12px);
    display: inline-block;
    margin-right: 1rem;
}
.section-header h2{
    font-family: "DM Serif Display", serif;
}
/* ===================== SERVICES ===================== */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr));
    gap: clamp(1.2rem, 3vw, 1.6rem);
}

.service-card {
    background: var(--card);
    padding: clamp(1.3rem, 3vw, 1.8rem);
    border-radius: clamp(10px, 2vw, 14px);
    text-align: center;
    box-shadow: 0 8px 24px rgba(0,0,0,0.08);
    transition: transform 0.3s, box-shadow 0.3s;
}

.service-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 32px rgba(0,0,0,0.12);
}

.service-card img {
    width: 100%;
    max-width: 80px;
    height: auto;
    display: block;
    margin: 0 auto;
    object-fit: contain;
}

.service-card h3 {
    font-size: clamp(1.1rem, 2.5vw, 1.3rem);
    margin: 1rem 0 0.5rem;
}

.service-card p {
    font-size: clamp(0.85rem, 1.8vw, 0.95rem);
    color: var(--muted);
}

/* ===================== PARTNERS ===================== */
.partners-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 180px), 1fr));
    gap: clamp(1.5rem, 3vw, 2rem);
}

.partner-card {
    padding: 1rem;
    text-align: center;
}

.partner-card img {
    width: 100%;
    max-width: 150px;
    height: auto;
    display: block;
    margin: 0 auto;
    object-fit: contain;
}

/* ===================== STATS ===================== */
.stats {
    background: var(--primary);
    color: #fff;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 160px), 1fr));
    gap: clamp(1rem, 3vw, 1.5rem);
    text-align: center;
}

.stat-item h3 {
    font-size: clamp(1.5rem, 4vw, 2.4rem);
    color: var(--accent);
    margin-bottom: 0.3rem;
}

.stat-item p {
    font-size: clamp(0.9rem, 2vw, 1rem);
}

/* ===================== CONTACT ===================== */
.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: clamp(1.5rem, 3vw, 2rem);
}

.contact-form {
    background: #f9fafb;
    padding: clamp(1.3rem, 3vw, 1.8rem);
    border-radius: 10px;
}


.submit-btn {
    background: var(--accent);
    color: #fff;
    padding: clamp(0.5rem, 1.5vw, 0.65rem) clamp(1rem, 2.5vw, 1.5rem);
    border-radius: 6px;
    font-weight: 600;
    font-size: clamp(0.85rem, 1.5vw, 1rem);
    transition: background 0.3s;
}


/* ===================== FOOTER ===================== */

.site-footer {
    background: #111827;
    color: #ffffff;
    width: 100%;
    padding: 3rem 0 1.5rem;
}

.site-footer .container {
    max-width: 1320px;
    margin: 0 auto;
    padding: 0 clamp(1rem, 5vw, 5%);
}

/* GRID */
.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 2.5rem;
}

/* SECTIONS */
.footer-section h3 {
    font-size: 1.2rem;
    margin-bottom: 1rem;
    color: #ffffff;
}

.footer-section p,
.footer-section a {
    font-size: 0.95rem;
    color: #9ca3af;
    line-height: 1.8;
    display: block;
}

.footer-section a {
    margin-bottom: 0.4rem;
}

.footer-section a:hover {
    color: #dc2626;
}

/* BOTTOM BAR */
.footer-bottom {
    margin-top: 2.5rem;
    padding-top: 1.2rem;
    border-top: 1px solid #374151;
    text-align: center;
    font-size: 0.9rem;
    color: #9ca3af;
}
/* ===============================
   CONTACT FORM WRAPPER
================================ */
.contact-form {
    max-width: 900px;
    margin: 0 auto;              /* CENTER FIX */
    padding: 2.5rem 2rem;
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.08);
}

/* ===============================
   FORM GRID SYSTEM
================================ */
#contactForm {
    display: flex;
    flex-direction: column;
    gap: 1.4rem;
}

.form-row {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.2rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

/* ===============================
   LABELS
================================ */
.form-group label {
    font-size: 0.9rem;
    font-weight: 600;
    color: #222;
}

/* ===============================
   INPUTS, SELECTS, TEXTAREA
================================ */
.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.7rem 0.85rem;
    font-size: 0.95rem;
    border-radius: 10px;
    border: 1px solid #dcdcdc;
    outline: none;
    transition: all 0.25s ease;
    font-family: inherit;
    background: #fff;
}

.form-group textarea {
    resize: vertical;
    min-height: 90px;
}

/* ===============================
   FOCUS STATES
================================ */
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    border-color: #2563eb; /* blue accent */
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

/* ===============================
   SELECT DROPDOWN FIX
================================ */
.form-group select {
    cursor: pointer;
}

/* ===============================
   SUBMIT BUTTON
================================ */
.submit-btn {
    margin-top: 1rem;
    padding: 0.85rem;
    border-radius: 12px;
    border: none;
    font-size: 1rem;
    font-weight: 600;
    background: linear-gradient(135deg, #2563eb, #1e40af);
    color: #fff;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.submit-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 10px 25px rgba(37, 99, 235, 0.35);
}

.submit-btn:active {
    transform: scale(0.98);
}

/* ===============================
   FORM STATUS MESSAGE
================================ */
.form-status {
    font-size: 0.9rem;
    font-weight: 500;
    min-height: 1.2em;
}

/* ===============================
   GRADES SECTION
================================ */
#grades-section {
    display: grid;
    gap: 1rem;
}

/* ===============================
   FORM HEADER
================================ */
.form-header {
    text-align: center;
    margin-bottom: 1.6rem;
}

.form-header h3 {
    font-size: clamp(1.2rem, 3.5vw, 1.6rem);
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 0.4rem;
}

.form-header p {
    font-size: 0.9rem;
    color: var(--muted);
    line-height: 1.5;
}

/* Mobile tweak */
@media (max-width: 768px) {
    .form-header {
        margin-bottom: 1.2rem;
    }

    .form-header p {
        font-size: 0.85rem;
    }
}
.facebook-posts {
    background: #f8fafc;
    padding: 80px 0;
}

.facebook-posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.fb-post-card {
    background: #ffffff;
    border-radius: 18px;
    padding: 14px;
    box-shadow: 0 15px 40px rgba(0,0,0,0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.fb-post-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 25px 50px rgba(0,0,0,0.12);
}

/* CRITICAL PART */

/* Compact Facebook post cards */
.fb-compact iframe {
    width: 100% !important;
    height: 420px;              /* ✅ CONTROL HEIGHT HERE */
    border: none;
    border-radius: 12px;
    overflow: hidden;
}
.facebook-cta {
    text-align: center;
    margin-top: 40px;
}

/* Optional: smaller height on mobile */
@media (max-width: 768px) {
    .fb-compact iframe {
        height: 360px;
    }
}


/* ===============================
   RESPONSIVE
================================ */
/* ===============================
   MOBILE FORM FULL-WIDTH FIX
================================ */
@media (max-width: 768px) {
    .contact-grid {
        padding-left: 0;
        padding-right: 0;
    }

    .contact-form {
        max-width: 100%;        /* 🔥 allow full width */
        width: 100%;
        margin: 0;
        padding: 1.2rem 0.9rem; /* 🔹 tighter side padding */
        border-radius: 12px;
    }

    /* Prevent container from squeezing the form */
    .contact .container {
        padding-left: 0.8rem;
        padding-right: 0.8rem;
    }
}

@media (max-width: 768px) {
    .contact-form {
        padding: 2rem 1.4rem;
    }

    .form-row {
        grid-template-columns: 1fr;
    }
}
/* ===============================
   OFFICE MAP SECTION
================================ */
/* MAP FRAME – SMALLER SIZE */
.map-embed {
    width: 100%;
    max-width: 900px;      /* 🔹 smaller than before */
    height: 340px;         /* 🔹 reduced height */
    margin: 0 auto;        /* CENTER */
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 16px 32px rgba(0, 0, 0, 0.12);
}

.map-embed iframe {
    width: 100%;
    height: 100%;
    border: 0;
}

/* RESPONSIVE */
@media (max-width: 768px) {
    .map-embed {
        height: 260px;
    }
}


/* MOBILE */
@media (max-width: 768px) {
    .site-footer {
        text-align: center;
    }

    .footer-grid {
        gap: 2rem;
    }
}

/* ===================== RESPONSIVE BREAKPOINTS ===================== */

/* Tablet: 768px - 1024px */
@media (max-width: 1024px) {
    .container {
        padding: 0 4%;
    }
    .nav-container{
        padding: clamp(1.8rem, 2vw, 1.8rem) 0;

    }
    
    .nav-menu {
        gap: 1.2rem;
    }
    
    .services-grid {
        grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    }
}

/* Small Tablet: 600px - 768px */
@media (max-width: 900px) {
    .welcome-grid,
    .contact-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .welcome-image {
        order: -1;
        max-height: 350px;
        aspect-ratio: 16/9;
    }
}

/* Mobile: 480px - 768px */
@media (max-width: 768px) {
    .nav-toggle {
        display: flex;
        margin-left: auto;
    }

    

    .nav-menu {
        display: none;
        flex-direction: column;
        background: #fff;
        position:absolute;
        top: 100%;
        left: 0;
        right: 0;
        padding: 1.5rem;
        box-shadow: 0 4px 12px rgba(0,0,0,0.1);
        gap: 0.8rem;
    }
    
    .nav-menu li {
        width: 100%;
        text-align: center;
        padding: 0.5rem 0;
    }

    .nav-menu.open {
        display: flex;
    }

    .apply-btn {
        display: none;
    }
    .welcome-image{
        height: 180px;
        
    }
    .destinations {
        padding-top: 5px;
        padding-bottom: 5px;
    }

    section {
        padding: 3rem 0;
    }
    
    .hero-slider {
        height: clamp(350px, 70vh, 500px);
    }
    .image-scroll-wrapper {
        padding: 1 0 rem;
    }
    
    .stats-grid {
        display: grid;
         grid-template-columns: repeat(2, 1fr); /* 2 columns */
         gap: 1.5rem;
    }
    .stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

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

    footer {
        text-align: center;
    }
    
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .services-grid {
        grid-template-columns: 1fr;
    }
}

/* Small Mobile: < 480px */
@media (max-width: 480px) {
   
    .logo{
        padding-top: 6px;
    }      
     .nav-toggle {
        display: flex;
        margin-left: auto;
    }

    .container {
        padding: 0 4%;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .hero-slider {
        height: clamp(300px, 60vh, 400px);
    }
    
    .slide-content h1 {
        font-size: 2rem;
    }
    
    .slide-content p {
        font-size: 0.9rem;
    }
    
    .partners-grid {
        grid-template-columns: 1fr;
    }
    
    .scroll-image {
        height: 200px;
    }
       .stats-grid {
       
        display: grid;
         grid-template-columns: repeat(2, 1fr); /* 2 columns */
         gap: 1.5rem;
    }
    .stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}
.stats{
    padding: 15px;
    margin-bottom: 15px;
}

    
    .welcome-image {
        max-height: 250px;
        aspect-ratio: 4/3;
    }
    
    .service-card img {
        max-width: 80px;
    }
    .partner-card img {
        max-width: 120px;
    }
    
    
}

/* Extra Small Mobile: < 360px */
@media (max-width: 360px) {
    .section-header h2 {
        font-size: 1.3rem;
    }
    
    .welcome-grid h1 {
        font-size: 1.3rem;
    }
    
    .hero-slider {
        height: 280px;
    }
}