/* ============================================
   E&O GLOBAL - RESPONSIVE STYLES
   Mobile-First Approach
   ============================================ */

/* Mobile First - Base styles for 375px+ */

/* Tablet - 768px and up */
@media (min-width: 768px) {
  .container {
    padding: 0 var(--spacing-lg);
  }
  
  .hero-content h1 {
    font-size: 56px;
  }
  
  .navbar-menu {
    display: flex;
  }
  
  .hamburger {
    display: none;
  }
}

/* Desktop - 1024px and up */
@media (min-width: 1024px) {
  .hero-content h1 {
    font-size: 64px;
  }
  
  .footer-container {
    grid-template-columns: repeat(4, 1fr);
  }
}

/* Large Desktop - 1440px and up */
@media (min-width: 1440px) {
  .container {
    max-width: 1400px;
  }
}

/* Mobile - Below 768px */
@media (max-width: 767px) {
  /* Mobile Navbar Menu - Improved */
  .navbar-menu {
    position: fixed;
    top: 0;
    right: -100%;
    width: 85%;
    max-width: 350px;
    height: 100vh;
    background: var(--primary-main);
    flex-direction: column;
    align-items: flex-start;
    padding: 80px var(--spacing-lg) var(--spacing-lg);
    transition: var(--transition-normal);
    box-shadow: -4px 0 20px rgba(0, 0, 0, 0.3);
    overflow-y: auto;
    border-left: none;
    z-index: 9999;
  }
  
  .navbar-menu.active {
    right: 0;
  }
  
  .navbar-menu li {
    width: 100%;
    margin-bottom: var(--spacing-xs);
  }
  
  .navbar-menu li:not(.dropdown) > a {
    display: block;
    width: 100%;
    padding: var(--spacing-sm) var(--spacing-md);
    color: #FFFFFF !important;
    background: transparent;
    border-radius: var(--radius-small);
    font-size: 16px;
    font-weight: 500;
  }
  
  .navbar-menu li:not(.dropdown) > a:hover {
    background: rgba(255, 255, 255, 0.1) !important;
    color: #FFFFFF !important;
  }
  
  /* Dropdown item styling */
  .navbar-menu .dropdown {
    position: relative;
    width: 100%;
  }
  
  .navbar-menu .dropdown-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: var(--spacing-sm) var(--spacing-md);
    color: #FFFFFF !important;
    background: transparent;
    border-radius: var(--radius-small);
    font-size: 16px;
    font-weight: 500;
    text-decoration: none;
    position: relative;
  }
  
  .navbar-menu .dropdown-link:hover,
  .navbar-menu .dropdown-link:focus,
  .navbar-menu .dropdown-link:active,
  .navbar-menu .dropdown-link:visited {
    color: #FFFFFF !important;
    background: rgba(255, 255, 255, 0.1) !important;
  }
  
  .navbar-menu .dropdown.active .dropdown-link {
    color: #FFFFFF !important;
    background: rgba(255, 255, 255, 0.1) !important;
  }
  
  /* Mobile dropdown icon styling - ensure white color and larger size */
  .navbar-menu .dropdown-link .dropdown-icon {
    margin-left: auto;
    flex-shrink: 0;
    color: #FFFFFF !important;
    stroke: #FFFFFF !important;
    width: 18px !important;
    height: 18px !important;
    min-width: 18px;
    min-height: 18px;
  }
  
  .navbar-menu .dropdown-link:hover .dropdown-icon,
  .navbar-menu .dropdown-link:focus .dropdown-icon,
  .navbar-menu .dropdown-link:active .dropdown-icon,
  .navbar-menu .dropdown.active .dropdown-link .dropdown-icon {
    color: #FFFFFF !important;
    stroke: #FFFFFF !important;
    width: 18px !important;
    height: 18px !important;
  }
  
  /* Ensure dropdown icon has touch-friendly click area */
  .navbar-menu .dropdown-link {
    min-height: 48px;
    padding: 14px var(--spacing-md);
  }
  
  /* Mobile Dropdown Styles */
  .navbar-menu .dropdown-menu {
    position: static;
    max-height: 0;
    opacity: 0;
    visibility: hidden;
    transform: none;
    background: transparent !important;
    box-shadow: none;
    margin: 0;
    border-radius: 0;
    padding: 0;
    overflow: hidden;
    transition: max-height 0.3s ease, opacity 0.3s ease, padding 0.3s ease, margin 0.3s ease;
  }
  
  /* Mobile Dropdown Active State */
  .navbar-menu .dropdown.active .dropdown-menu {
    max-height: 500px;
    opacity: 1;
    visibility: visible;
    margin: var(--spacing-xs) 0;
    padding: 0;
  }
  
  /* Mobile dropdown menu items - white text, no background */
  .navbar-menu .dropdown-menu li {
    background: transparent !important;
    margin: 0;
    padding: 0;
  }
  
  .navbar-menu .dropdown-menu a,
  .navbar-menu .dropdown-menu a:link,
  .navbar-menu .dropdown-menu a:visited,
  .navbar-menu .dropdown-menu a:hover,
  .navbar-menu .dropdown-menu a:focus,
  .navbar-menu .dropdown-menu a:active {
    color: #FFFFFF !important;
    background: transparent !important;
    padding-left: var(--spacing-xl) !important;
    padding-right: var(--spacing-md) !important;
    padding-top: var(--spacing-sm) !important;
    padding-bottom: var(--spacing-sm) !important;
    font-size: 15px;
    font-weight: 400;
    text-decoration: none !important;
    border-radius: 0 !important;
    display: block;
  }
  
  .navbar-menu .dropdown-menu a:hover,
  .navbar-menu .dropdown-menu a:focus {
    background: rgba(255, 255, 255, 0.1) !important;
    color: #FFFFFF !important;
  }
  
  .navbar-menu .dropdown-menu a:active {
    background: rgba(255, 255, 255, 0.15) !important;
    color: #FFFFFF !important;
  }
  
  /* Mobile Dropdown Icon Rotation */
  .navbar-menu .dropdown.active .dropdown-link .dropdown-icon {
    transform: rotate(180deg);
  }
  
  /* Mobile Contact Button */
  .navbar-contact-btn {
    margin-left: 0 !important;
    margin-top: var(--spacing-md) !important;
    text-align: center;
    width: 100%;
    background: var(--secondary-red) !important;
    color: white !important;
    padding: var(--spacing-sm) var(--spacing-md) !important;
  }
  
  /* Hamburger - ensure it's visible on mobile */
  .hamburger {
    display: flex;
    z-index: 10001;
    position: fixed;
    top: 20px;
    right: var(--spacing-md);
    background: transparent;
    border-radius: var(--radius-small);
    padding: 12px;
    backdrop-filter: none;
    box-shadow: none;
    width: 48px;
    height: 48px;
    align-items: center;
    justify-content: center;
  }
  
  /* Hamburger when navbar is scrolled - no background change */
  .navbar.scrolled .hamburger {
    background: transparent;
    box-shadow: none;
  }
  
  .navbar.hero-page .hamburger {
    background: transparent;
  }
  
  .navbar.hero-page.scrolled .hamburger {
    background: transparent;
  }
  
  /* X icon styling for mobile - larger size and always white */
  .hamburger.active::after {
    font-size: 36px;
    color: #FFFFFF !important;
  }
  
  /* Ensure X icon stays white on mobile regardless of scroll state */
  .navbar.scrolled .hamburger.active::after,
  .navbar.hero-page .hamburger.active::after,
  .navbar.hero-page.scrolled .hamburger.active::after {
    color: #FFFFFF !important;
  }
  
  .hamburger span {
    background: #FFFFFF;
  }
  
  .navbar.scrolled .hamburger span {
    background: var(--primary-main);
  }
  
  .navbar.hero-page .hamburger span {
    background: #FFFFFF;
  }
  
  .navbar.hero-page.scrolled .hamburger span {
    background: var(--primary-main);
  }
  
  /* Hero Mobile */
  body.hero-page .hero-section {
    height: 550px !important; /* Increased height to accommodate moved content */
    min-height: 550px !important;
    padding-top: 0 !important; /* Reset padding, content positioned by hero-content */
  }
  
  /* Hero content mobile - move content down */
  body.hero-page .hero-content {
    padding-top: 180px !important; /* Move content down on mobile - more space */
  }
  
  .hero-content h1 {
    font-size: 32px;
    margin-bottom: var(--spacing-md);
  }
  
  .hero-content p {
    font-size: 16px;
    margin-bottom: var(--spacing-lg); /* More space below text - moves text down */
  }
  
  /* Hero button spacing - 24px from hero bottom */
  /* Amerika and Schengen pages */
  .hero-content > div[style*="margin-top"] {
    margin-top: var(--spacing-lg) !important;
    margin-bottom: 24px !important; /* 24px space from hero bottom */
  }
  
  /* İngiltere page */
  .hero-content .hero-cta {
    flex-direction: column;
    margin-top: var(--spacing-lg) !important;
    margin-bottom: 24px !important; /* 24px space from hero bottom */
  }
  
  .hero-cta a {
    width: 100%;
  }
  
  /* Ensure button wrapper has 24px margin-bottom for all hero pages */
  body.hero-page .hero-content > div:last-child {
    margin-bottom: 24px !important;
  }
  
  /* Buttons Mobile */
  .btn-primary,
  .btn-secondary {
    width: 100%;
    padding: 14px 24px;
  }
  
  /* Cards Mobile */
  .card {
    padding: var(--spacing-md);
  }
  
  /* Footer Mobile */
  .footer-container {
    grid-template-columns: 1fr;
    gap: var(--spacing-lg);
  }
  
  /* Phone Button Mobile */
  .phone-float {
    width: 50px;
    height: 50px;
    bottom: 75px;
    right: 15px;
  }
  
  .phone-icon {
    width: 24px;
    height: 24px;
  }
  
  .phone-tooltip {
    display: none;
  }
  
  /* WhatsApp Button Mobile - Same size as phone button */
  .whatsapp-float {
    width: 50px !important;
    height: 50px !important;
    bottom: 15px !important;
    right: 15px !important;
  }
  
  .whatsapp-icon {
    width: 28px !important;
    height: 28px !important;
  }
  
  .whatsapp-tooltip {
    display: none;
  }
  
  /* Forms Mobile */
  .form-group {
    margin-bottom: var(--spacing-sm);
  }
  
  .form-group input,
  .form-group textarea,
  .form-group select {
    font-size: 16px !important; /* Prevents zoom on iOS */
    padding: 14px 16px !important;
    border: 2px solid #E0E0E0;
    border-radius: var(--radius-small);
    -webkit-appearance: none;
    appearance: none;
  }
  
  /* Focus durumunda daha belirgin border */
  .form-group input:focus,
  .form-group textarea:focus,
  .form-group select:focus {
    border-color: var(--secondary-red);
    outline: none;
    box-shadow: 0 0 0 3px rgba(255, 77, 77, 0.1);
  }
  
  /* Input type optimizasyonları */
  input[type="tel"],
  input[type="email"] {
    -webkit-appearance: none;
    appearance: none;
  }
  
  /* Card içindeki form padding azalt */
  .card form {
    padding: var(--spacing-sm) !important;
  }
  
  .card {
    padding: var(--spacing-sm) !important;
  }
  
  /* Toast Mobile */
  .toast {
    left: 20px;
    right: 20px;
    min-width: auto;
  }
  
  
  /* Typography Mobile */
  h1 {
    font-size: 32px;
  }
  
  h2 {
    font-size: 28px;
  }
  
  h3 {
    font-size: 20px;
  }
  
  /* Section Spacing Mobile */
  .section {
    padding: var(--spacing-lg) 0;
  }
  
  /* Container padding optimize */
  .container {
    padding: 0 var(--spacing-sm);
  }
  
  /* Line-height optimize for mobile readability */
  p {
    line-height: 1.6;
  }
  
  .content-section p {
    line-height: 1.6;
  }

  /* Schengen Country Cards Mobile */
  .schengen-country-card {
    padding: var(--spacing-md);
  }

  .schengen-country-card img {
    width: 60px !important;
    height: 45px !important;
  }

  .schengen-country-name {
    font-size: 18px;
  }

  /* Country Cards Grid - Mobile: 2 columns */
  /* Target the countries section grid container on homepage and schengen page */
  .section .container > div[style*="grid-template-columns: repeat(auto-fit, minmax(200px, 1fr))"] {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: var(--spacing-md) !important;
  }

  /* Country card flag size on mobile - smaller to fit 2 per row */
  .country-card > div[style*="width: 80px"] {
    width: 60px !important;
    height: 45px !important;
  }

  /* Country card padding on mobile - reduce for better fit */
  .country-card {
    padding: var(--spacing-md) var(--spacing-sm) !important;
  }

  .country-card h3 {
    font-size: 16px !important;
    margin-top: var(--spacing-xs) !important;
  }

  /* Info Grid Mobile */
  .info-grid {
    grid-template-columns: 1fr;
    gap: var(--spacing-md);
  }

  /* FAQ Mobile */
  .faq-question {
    padding: var(--spacing-md) 12px var(--spacing-md) 12px;
    font-size: 16px;
    gap: var(--spacing-md);
  }

  .faq-answer {
    padding: 0 var(--spacing-md);
  }

  .faq-answer.active {
    padding: 0 var(--spacing-md) var(--spacing-md);
  }

  /* Blog Posts Mobile - Single Column */
  #blog-posts-container {
    grid-template-columns: 1fr !important;
  }

  /* Touch-friendly minimum sizes - Apple's 48px recommendation */
  .btn-primary,
  .btn-secondary,
  .navbar-menu a,
  .dropdown-menu a,
  .toc-link,
  .faq-question,
  .sidebar-cta-btn,
  .mobile-toc-toggle button {
    min-height: 48px !important;
    min-width: 48px !important;
    padding: 14px 20px !important;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  /* Mobilde içerik kopyalama engelleme */
  body,
  .content-section,
  .visa-content,
  .detail-main-content,
  .info-box,
  p,
  h1,
  h2,
  h3,
  h4,
  h5,
  h6,
  li,
  span:not(.required):not(.faq-icon) {
    -webkit-user-select: none !important;
    -moz-user-select: none !important;
    -ms-user-select: none !important;
    user-select: none !important;
  }

  /* Form input/textarea seçilebilir kalmalı */
  .form-group input,
  .form-group textarea {
    -webkit-user-select: text !important;
    -moz-user-select: text !important;
    -ms-user-select: text !important;
    user-select: text !important;
  }
}

/* Small Mobile - Below 375px */
@media (max-width: 374px) {
  .container {
    padding: 0 var(--spacing-sm);
  }
  
  .hero-content h1 {
    font-size: 28px;
  }
  
  .navbar-menu {
    width: 100%;
  }
}

/* Touch-friendly adjustments */
@media (hover: none) and (pointer: coarse) {
  .btn-primary,
  .btn-secondary,
  .navbar-menu a,
  .dropdown-menu a {
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
  }
}

