/* ImageResizerAI - Master Optimized Stylesheet v3.0 */
:root {
  --navy: #1e3a5f;
  --blue: #1a73e8;
  --blue-h: #1557b0;
  --blue-l: #e8f0fe;
  --green: #34a853;
  --bg: #f1f5ff;
  --card: #fff;
  --border: #dadce0;
  --text: #202124;
  --muted: #5f6368;
  --muted2: #9aa0a6;
  --font: 'Nunito', sans-serif;
  --shadow: 0 2px 12px rgba(0,0,0,.10);
  --r: 14px;
  --rs: 8px;
}

/* 1. RESET & GLOBAL */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; scroll-behavior: smooth; }
body { font-family: var(--font); background: var(--bg); color: var(--text); min-height: 100vh; display: flex; flex-direction: column; line-height: 1.65; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--blue); text-decoration: underline; transition: 0.2s; }
a:hover { text-decoration: none; }
.container { max-width: 860px; width: 100%; margin: 0 auto; padding: 0 20px; }

/* 2. HEADER BASE */
.site-header { background: var(--navy); padding: 12px 0; box-shadow: 0 2px 10px rgba(0,0,0,.25); position: sticky; top: 0; z-index: 1000; width: 100%; }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 15px; }

.logo { display: flex; align-items: center; gap: 10px; text-decoration: none !important; flex-shrink: 0; }
.logo-box { width: 36px; height: 36px; background: #fff; border-radius: 8px; display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 6px; }
.logo-box span { border-radius: 2px; }
.logo-box .b1, .logo-box .b2, .logo-box .b3 { background: var(--blue); }
.logo-box .b4 { background: var(--green); }
.logo-text { font-size: 1.1rem; font-weight: 800; color: #fff; white-space: nowrap; }

/* 3. DESKTOP NAVIGATION & DROPDOWNS */
.header-nav { display: flex; gap: 5px; margin-left: auto; align-items: center; }
.nav-item { position: relative; list-style: none; }

.nav-link { 
    color: rgba(255,255,255,.9); text-decoration: none !important; 
    font-size: .88rem; font-weight: 700; padding: 8px 15px; 
    border-radius: 6px; transition: 0.2s; white-space: nowrap; 
    background: transparent; border: none; cursor: pointer;
}
.nav-link:hover { color: #fff; background: rgba(255,255,255,0.12); }
.nav-link.active { background: rgba(255,255,255,0.2); color: #fff; }

/* Desktop Hover Menus */
.dropdown-menu, .submenu {
    display: none; position: absolute; top: 100%; left: 0;
    background: #fff; min-width: 210px; box-shadow: 0 8px 24px rgba(0,0,0,0.15);
    border-radius: 8px; padding: 10px 0; z-index: 1100; border: 1px solid var(--border);
}
.dropdown-menu a, .submenu a {
    display: block; padding: 10px 20px; color: var(--text) !important;
    text-decoration: none !important; font-size: 14px; font-weight: 600;
}
.dropdown-menu a:hover, .submenu a:hover { background: var(--blue-l); color: var(--blue) !important; }

/* Desktop Only Logic */
@media (min-width: 901px) {
    .nav-item:hover > .dropdown-menu { display: block; }
    .dropdown-item:hover > .submenu { display: block; top: 0; left: 100%; }
    .mobile-menu, .menu-toggle { display: none !important; }
    .lang-wrap > span:not(.lang-btn) { display: none !important; } /* Ghost text fix */
}


/* 4. PROFESSIONAL LANGUAGE SWITCHER */
.lang-wrap { position: relative; flex-shrink: 0; }

.lang-btn {
    display: flex; align-items: center; gap: 8px;
    background: #ffffff; border: 1.5px solid rgba(0,0,0,0.1);
    color: #333; padding: 6px 14px; border-radius: 10px;
    font-size: 0.85rem; font-weight: 700; cursor: pointer;
    box-shadow: 0 2px 6px rgba(0,0,0,0.05);
}

.lang-dropdown {
    display: none; position: absolute; top: calc(100% + 10px); right: 0;
    background: #ffffff; min-width: 260px; border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.12); z-index: 3000;
    border: 1px solid #eee; overflow: hidden;
}
.lang-dropdown.show { display: flex !important; flex-direction: column; }

.lang-list { max-height: 420px; overflow-y: auto; display: flex; flex-direction: column; }

.lang-item {
    display: flex !important; align-items: center; padding: 12px 16px;
    text-decoration: none !important; border-left: 3px solid transparent;
    transition: 0.2s; cursor: pointer;
}

.l-code-box { font-size: 0.75rem; font-weight: 800; color: #444; width: 35px; flex-shrink: 0; }
.l-names { display: flex; flex-direction: column; flex: 1; text-align: left; }
.l-en { font-size: 0.9rem; font-weight: 700; color: #333; line-height: 1.2; }
.l-native { font-size: 0.78rem; font-weight: 500; color: #999; }

.lang-item:hover { background: #f5f8ff; }
.lang-item.active { background: #ebf3ff; border-left-color: var(--blue); }
.lang-item.active .l-en, .lang-item.active .l-code-box { color: var(--blue); }
.active-tick { color: var(--blue); margin-left: 10px; }




/* 5. COMPONENTS (Hero, Cards, Buttons) */
.hero { background: linear-gradient(160deg, #1e3a5f 0%, #1a4f8a 55%, #1e5ea8 100%); padding: 44px 0 36px; text-align: center; border-bottom: 4px solid #2563c8; color: #fff; }
.hero-title { font-size: clamp(1.35rem, 4vw, 2.1rem); font-weight: 800; margin-bottom: 10px; line-height: 1.25; }
.hero-sub { font-size: 1rem; color: rgba(255,255,255,.85); font-weight: 600; padding: 0 16px; }

.main-content { flex: 1; padding: 32px 20px 56px; display: flex; flex-direction: column; gap: 24px; }
.card { background: var(--card); border-radius: var(--r); box-shadow: var(--shadow); overflow: hidden; }

.upload-zone { display: flex; flex-direction: column; align-items: center; padding: 50px 24px; text-align: center; border: 2.5px dashed #c0cce8; border-radius: var(--r); cursor: pointer; background: #fff; }
.upload-zone:hover { border-color: var(--blue); background: #eef3fd; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border-radius: var(--rs); font-weight: 700; cursor: pointer; transition: 0.2s; text-decoration: none !important; }
.btn-primary { background: var(--blue); color: #fff; padding: 12px 28px; }
.btn-green { background: var(--green); color: #fff; padding: 13px 40px; }

/* 6. CONSOLIDATED MOBILE LOGIC (Max 900px) */
@media (max-width: 900px) {
    .header-nav { display: none !important; }
    .header-inner { justify-content: space-between !important; padding: 0 10px !important; gap: 8px !important; }
    
    /* KILL GHOST TEXT */
    #langWrap > span, .lang-wrap > span, .lang-label, #currentLang { display: none !important; }

    .logo-text { font-size: 0.88rem !important; max-width: 140px; overflow: hidden; }
    .lang-btn { padding: 5px 8px !important; font-size: 0.75rem !important; }

    .menu-toggle {
        display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 4px;
        width: 42px; height: 42px; background: rgba(255,255,255,0.1); border-radius: 6px; border: none; cursor: pointer;
    }
    .menu-toggle span { width: 22px; height: 2px; background: #fff; transition: 0.3s; }
    .menu-toggle.open span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
    .menu-toggle.open span:nth-child(2) { opacity: 0; }
    .menu-toggle.open span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

    .mobile-menu {
        position: fixed; top: 60px; left: -100%; width: 85%; max-width: 300px;
        height: calc(100vh - 60px); background: var(--navy); z-index: 9999;
        display: flex !important; flex-direction: column; padding: 20px; transition: 0.4s ease;
        box-shadow: 10px 0 20px rgba(0,0,0,0.3); overflow-y: auto; visibility: hidden;
    }
    .mobile-menu.active { left: 0; visibility: visible; }
    .mobile-menu a { color: #fff; padding: 12px 10px; text-decoration: none !important; border-bottom: 1px solid rgba(255,255,255,0.1); }
    
    /* Mobile Language Switcher (Bottom Sheet) */
    .lang-dropdown {
        position: fixed !important; top: auto; bottom: 0; left: 0; right: 0;
        min-width: 100% !important; border-radius: 20px 20px 0 0 !important;
    }
}

/* 8. FAQ */
.faq-q { width: 100%; background: none; border: none; padding: 18px 20px; font-family: var(--font); font-size: .95rem; font-weight: 700; color: var(--text); cursor: pointer; display: flex; justify-content: space-between; align-items: center; text-align: left; }
.faq-a { display: none; padding: 0 20px 18px; font-size: .9rem; color: var(--muted); line-height: 1.6; }
.faq-item.open .faq-a { display: block; }

/* 7. FOOTER */
/* 7. FOOTER */
.site-footer { background: #1a304d; padding: 40px 0 20px 0; margin-top: auto; color: #FFFFFF; }
.footer-inner { max-width: 1000px; width: 100%; margin: 0 auto; padding: 0 20px; display: flex; flex-direction: column; gap: 30px; }

.footer-top { 
    display: flex; 
    align-items: center; 
    justify-content: space-between; 
    width: 100%; 
    flex-wrap: wrap; 
    gap: 20px; 
}

.footer-logo { display: flex; align-items: center; gap: 10px; font-size: 1.1rem; font-weight: 800; color: #fff; text-decoration: none !important; }

/* Group text links and social icons */
.footer-nav { 
    display: flex; 
    align-items: center; 
    gap: 25px; 
    flex-wrap: wrap; 
}

/* Style the text links */
.footer-nav > a { 
    color: #b0c4de; /* Softer blue-grey text */
    text-decoration: none !important; 
    font-size: .9rem; 
    font-weight: 600; 
    transition: color 0.2s ease;
}
.footer-nav > a:hover { color: #fff; }

/* Fix the Social Icons container to sit side-by-side */
.social-icons { 
    display: flex; 
    align-items: center; 
    gap: 12px; 
    margin-left: 15px; /* Pushes icons slightly away from text links */
    padding-left: 20px;
    border-left: 1px solid rgba(255,255,255,0.15); /* Adds a pro separator line */
}

/* Style the individual social buttons */
.social-icons a { 
    display: flex; 
    align-items: center; 
    justify-content: center; 
    color: #fff; 
    width: 36px; /* Slightly smaller, more refined */
    height: 36px; 
    background: rgba(255,255,255,0.08); 
    border-radius: 50%; 
    text-decoration: none !important; 
    transition: all 0.2s ease;
}
.social-icons a:hover {
    background: var(--blue);
    transform: translateY(-3px); /* Gentle float effect on hover */
}

.footer-copy { 
    font-size: .85rem; 
    color: rgba(255,255,255,0.5); 
    text-align: center; 
    width: 100%; 
    padding-top: 20px; 
    border-top: 1px solid rgba(255,255,255,0.1); 
}

/* Mobile adjustments so it looks perfect on phones */
@media (max-width: 768px) {
    .footer-top {
        flex-direction: column;
        justify-content: center;
        text-align: center;
        gap: 25px;
    }
    .footer-nav {
        justify-content: center;
    }
    .social-icons {
        margin-left: 0;
        padding-left: 0;
        border-left: none;
        justify-content: center;
        width: 100%;
        margin-top: 10px;
    }
}





    /* Fix the Menu Button */
    .menu-toggle {
        order: 2; /* Puts menu button on the far right */
        padding: 8px;
        background: rgba(255, 255, 255, 0.1);
        border-radius: 6px;
    }

    /* Fix the Language Selector */
    .lang-selector {
        order: 1; /* Puts language to the left of the menu button */
        height: 32px;
        font-size: 0.75rem;
    }
}


/* Header Layout */
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

/* Grouping Language and Menu Button */
.header-right {
  display: flex;
  align-items: center;
  gap: 12px; /* Space between the two elements */
  margin-left: auto;
}

.lang-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #fff;
  padding: 6px 10px;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 700;
  font-size: 14px;
}

/* Burger Menu Styles */
.menu-toggle {
  display: none; /* Hidden on desktop */
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  padding: 8px;
  cursor: pointer;
}

.menu-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: #fff;
  border-radius: 2px;
  transition: 0.3s;
}

/* Tablet & Mobile (iPad check) */
@media (max-width: 991px) {
  .header-nav {
    display: none; /* Hide desktop nav earlier for iPad */
  }
  
  .menu-toggle {
    display: flex;
  }
  
  .lang-btn .lang-label {
    display: none; /* Hide full "English" text on mobile */
  }
}