/* ========================================
   SAFOOD - Signup Page (Responsive Version)
   Fixed Spacing & Fully Responsive
   ======================================== */

/* ===== BASE VARIABLES ===== */
:root {
  --dark-brown: #2C2416;
  --gold: #B8954A;
  --gold-link: #AE8A1F;
  --gold-active: #AF8A1F;
  --gold-btn-start: #FFD700;
  --gold-btn-end: #6F4E37;
  --light-gold: #D4B575;
  --cream: #FBF8F0;
  --beige: #F6EEDB;
  --text-dark: #2C2416;
  --text-medium: #6B5D4F;
  --text-light: #D4C7B5;
  --text-gray: #968778;
  --text-placeholder: #9DA2AE;
  --text-secondary: #6C6969;
  --white: #FFFFFF;
  --border-light: #EAE3D5;
  --border-input: #E5E5EA;
  --font-inter: 'Inter', sans-serif;
  --font-montserrat: 'Montserrat', sans-serif;
}

/* ===== BASE RESET ===== */
* { margin: 0; padding: 0; box-sizing: border-box; }
html { 
  scroll-behavior: smooth; 
  height: 100%;
}
body {
  font-family: var(--font-inter);
  color: var(--text-dark);
  line-height: 1.6;
  background: var(--white);
  min-height: 100vh;
  width: 100%;
}
img { max-width: 100%; height: auto; display: block; }
a { text-decoration: none; color: inherit; transition: color 0.3s ease; }
ul { list-style: none; }

/* ===== SIGNUP SECTION ===== */
.signup-section {
  min-height: 100vh;
  width: 100%;
  display: flex;
  align-items: stretch;
  justify-content: center;
  background: var(--white);
  position: relative;
}

.signup-container {
  display: flex;
  width: 100%;
  min-height: 100vh;
  margin: 0;
  padding: 0;
  position: relative;
}

/* Left Side - Form */
.signup-form-wrapper {
  flex: 0 0 60%;
  width: 60%;
  padding: 60px 40px 40px 60px;
  background: var(--white);
  display: flex;
  flex-direction: column;
  justify-content: center;
  overflow: hidden;
  min-height: 100vh;
}

.signup-form {
  width: 100%;
  max-width: 450px;
  margin: 0 auto;
  padding-top: 20px;
}

/* Logo Styles for Signup Page */
.signup-logo {
  position: absolute;
  top: 30px;
  left: 60px;
  z-index: 10;
}

.logo-link {
  display: inline-table;
  align-items: center;
  gap: 0;
  font-size: 24px;
  font-weight: 700;
  line-height: 1.2;
  text-decoration: none;
  transition: opacity 0.3s ease;
}

.logo-link:hover {
  opacity: 0.8;
}

.logo-s {
  color: var(--gold);
  letter-spacing: 0;
}

.logo-a {
  color: var(--gold);
  letter-spacing: 0;
}

.logo-dark {
  color: var(--text-dark);
}

.signup-header {
  margin-bottom: 24px;
}

.signup-title {
  color: var(--text-dark);
  font-size: 28px;
  font-family: var(--font-inter);
  font-weight: 600;
  line-height: 1.3;
  margin-bottom: 8px;
}

.signup-subtitle {
  color: var(--text-secondary);
  font-size: 15px;
  font-family: var(--font-inter);
  font-weight: 400;
  line-height: 1.5;
}

.signup-fields {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.form-group {
  position: relative;
}

.form-input {
  width: 100%;
  height: 50px;
  padding: 0 16px;
  background: var(--white);
  border: 1px solid var(--border-input);
  border-radius: 8px;
  font-family: var(--font-inter);
  font-size: 14px;
  font-weight: 400;
  color: var(--text-dark);
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.form-input::placeholder {
  color: var(--text-placeholder);
}

.form-input:focus {
  outline: none;
  border-color: var(--gold-active);
  box-shadow: 0 0 0 3px rgba(175, 138, 31, 0.10);
}

/* Phone Input with Country Dropdown */
.phone-group {
  display: flex;
  gap: 0;
  position: relative;
}

.phone-prefix {
  position: relative;
  min-width: 110px;
  height: 50px;
  background: var(--white);
  border: 1px solid var(--border-input);
  border-right: none;
  border-radius: 8px 0 0 8px;
  display: flex;
  align-items: center;
  overflow: hidden;
}

.country-select {
  width: 100%;
  height: 100%;
  padding: 0 32px 0 40px;
  background: transparent;
  border: none;
  font-family: var(--font-inter);
  font-size: 14px;
  font-weight: 400;
  color: var(--text-dark);
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  outline: none;
}

.flag-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 20px;
  height: 14px;
  pointer-events: none;
  z-index: 1;
  object-fit: cover;
  border-radius: 2px;
}

.country-select option {
  font-family: var(--font-inter);
  font-size: 13px;
  padding: 8px 12px;
  background: var(--white);
  color: var(--text-dark);
}

.select-arrow {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  width: 14px;
  height: 14px;
  pointer-events: none;
}

.select-arrow::after {
  content: '';
  position: absolute;
  width: 5px;
  height: 5px;
  border: 1.5px solid var(--text-medium);
  border-top: none;
  border-right: none;
  transform: rotate(-45deg);
  top: 4px;
  left: 4px;
}

.phone-input {
  flex: 1;
  border-radius: 0 8px 8px 0;
  border-left: none;
  height: 50px;
}

.phone-group:focus-within .phone-prefix,
.phone-group:focus-within .phone-input {
  border-color: var(--gold-active);
  box-shadow: 0 0 0 3px rgba(175, 138, 31, 0.10);
}

/* Business Type Select */
.form-select {
  width: 100%;
  height: 50px;
  padding: 0 16px;
  padding-right: 36px;
  background: var(--white);
  border: 1px solid var(--border-input);
  border-radius: 8px;
  font-family: var(--font-inter);
  font-size: 14px;
  font-weight: 400;
  color: var(--text-dark);
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
}

.form-select:focus {
  outline: none;
  border-color: var(--gold-active);
}

.form-select + .select-arrow {
  right: 18px;
}

/* Terms Checkbox */
.terms-group {
  margin-top: 8px;
  margin-bottom: 8px;
}

.checkbox-label {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  cursor: pointer;
}

.custom-checkbox {
  position: absolute;
  opacity: 0;
  cursor: pointer;
  height: 0;
  width: 0;
}

.checkbox-custom {
  flex-shrink: 0;
  width: 18px;
  height: 18px;
  background: var(--gold);
  border-radius: 4px;
  position: relative;
  margin-top: 2px;
  transition: background 0.3s ease;
}

.checkbox-custom::after {
  content: '';
  position: absolute;
  left: 6px;
  top: 2px;
  width: 4px;
  height: 9px;
  border: solid white;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
  opacity: 0;
  transition: opacity 0.2s ease;
}

.custom-checkbox:checked + .checkbox-custom::after {
  opacity: 1;
}

.terms-text {
  color: var(--text-dark);
  font-size: 13px;
  font-family: var(--font-inter);
  font-weight: 400;
  line-height: 1.5;
}

.terms-text a {
  color: var(--gold-link);
  font-weight: 500;
  transition: color 0.3s ease;
}

.terms-text a:hover {
  color: var(--gold);
}

/* Submit Button */
.btn-submit {
  width: 100%;
  height: 50px;
  margin-top: 12px;
  background: linear-gradient(135deg, #C4A35A 0%, #B8931C 50%, #A67C00 100%);
  border: none;
  border-radius: 8px;
  color: var(--white);
  font-family: var(--font-inter);
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.btn-submit:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 30px rgba(175, 138, 31, 0.3);
}

/* Right Side - Image */
.signup-image-wrapper {
  flex: 0 0 40%;
  width: 40%;
  position: relative;
  right: 0;
  top: 0;
  height: 100vh;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.signup-image-bg {
  display: none;
}

.signup-image {
  width: 100%;
  height: 100%;
  border-top-left-radius: 70px;
  background: linear-gradient(180deg, #FFD700 17%, #6F4E37 82%), linear-gradient(222deg, #7209B7 9%, #2ECC71 100%);
  object-fit: cover;
  object-position: center;
  opacity: 1;
}

/* Navigation Arrows */
.nav-arrows {
  position: absolute;
  bottom: 30px;
  right: 30px;
  display: flex;
  align-items: center;
  gap: 10px;
  z-index: 2;
}

.nav-arrow {
  width: 44px;
  height: 44px;
  background: rgba(255, 255, 255, 0.80);
  border-radius: 50%;
  backdrop-filter: blur(4px);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.3s ease, transform 0.3s ease;
}

.nav-arrow:hover {
  background: rgba(255, 255, 255, 0.95);
  transform: scale(1.05);
}

.arrow-icon {
  width: 7px;
  height: 12px;
  background: #696969;
  clip-path: polygon(100% 50%, 0 100%, 0 0);
  transform: rotate(180deg);
}

.arrow-icon.next-icon {
  transform: rotate(0deg);
  background: #404040;
}

/* ===== RESPONSIVE BREAKPOINTS ===== */

/* Large Desktop */
@media (min-width: 1400px) {
  .signup-form-wrapper {
    padding: 60px 60px 40px 80px;
  }
  
  .signup-form {
    max-width: 480px;
  }
}

/* Desktop */
@media (max-width: 1200px) {
  .signup-form-wrapper {
    flex: 0 0 55%;
    width: 55%;
    padding: 50px 40px 40px 50px;
  }
  .signup-image-wrapper {
    flex: 0 0 45%;
    width: 45%;
  }
}

/* Tablet */
@media (max-width: 991px) {
  .signup-form-wrapper {
    flex: 0 0 50%;
    width: 50%;
    padding: 50px 35px 40px 40px;
  }
  .signup-image-wrapper {
    flex: 0 0 50%;
    width: 50%;
  }
  
  .signup-logo {
    left: 40px;
  }
  
  .signup-title {
    font-size: 26px;
  }
  
  .signup-subtitle {
    font-size: 14px;
  }
  
  .nav-arrows {
    bottom: 25px;
    right: 25px;
  }
}

/* Small Tablet / Large Mobile */
@media (max-width: 768px) {
  .signup-container {
    flex-direction: column;
  }
  
  .signup-form-wrapper {
    flex: none;
    width: 100%;
    min-height: auto;
    padding: 80px 30px 30px 30px;
    order: 2;
  }
  
  .signup-form {
    max-width: 100%;
  }
  
  .signup-image-wrapper {
    position: relative;
    flex: none;
    width: 100%;
    min-height: 300px;
    height: 40vh;
    order: 1;
    right: auto;
    top: auto;
  }
  
  .signup-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    border-top-left-radius: 0;
    border-top-right-radius: 0;
  }
  
  .nav-arrows {
    bottom: 20px;
    right: 20px;
  }
  
  .signup-logo {
    left: 30px;
  }
}

/* Mobile */
@media (max-width: 480px) {
  .signup-form-wrapper {
    padding: 70px 20px 25px 20px;
  }
  
  .signup-logo {
    left: 20px;
    top: 20px;
  }
  
  .logo-link {
    font-size: 22px;
  }
  
  .signup-header {
    margin-bottom: 20px;
  }
  
  .signup-title {
    font-size: 24px;
  }
  
  .signup-subtitle {
    font-size: 14px;
  }
  
  .signup-fields {
    gap: 12px;
  }
  
  .form-input,
  .phone-prefix,
  .form-select,
  .btn-submit {
    height: 48px;
  }
  
  .form-input,
  .form-select {
    font-size: 14px;
    padding: 0 14px;
  }
  
  .phone-prefix {
    min-width: 100px;
  }
  
  .country-select {
    font-size: 13px;
    padding: 0 28px 0 36px;
  }
  
  .flag-icon {
    width: 18px;
    height: 12px;
    left: 10px;
  }
  
  .form-select {
    padding-right: 32px;
  }
  
  .terms-text {
    font-size: 12px;
  }
  
  .checkbox-custom {
    width: 16px;
    height: 16px;
  }
  
  .checkbox-custom::after {
    left: 5px;
    top: 2px;
    width: 4px;
    height: 8px;
  }
  
  .btn-submit {
    font-size: 14px;
    margin-top: 12px;
    margin-bottom: 10px;
  }
  
  .signup-image-wrapper {
    min-height: 220px;
    height: 35vh;
  }
  
  .nav-arrows {
    bottom: 15px;
    right: 15px;
  }
  
  .nav-arrow {
    width: 40px;
    height: 40px;
  }
}

/* Extra Small Mobile */
@media (max-width: 360px) {
  .signup-title {
    font-size: 22px;
  }
  
  .signup-subtitle {
    font-size: 13px;
  }
  
  .form-input,
  .form-select {
    font-size: 13px;
  }
  
  .phone-prefix {
    min-width: 90px;
  }
}

/* ===== RTL SUPPORT ===== */
html[dir="rtl"] .signup-form-wrapper {
  padding: 60px 60px 40px 40px;
}

html[dir="rtl"] .signup-logo {
  left: auto;
  right: 60px;
}

html[dir="rtl"] .signup-image-wrapper {
  right: auto;
  left: 0;
  border-radius: 0;
}

html[dir="rtl"] .signup-image {
  border-top-left-radius: 0px;
  border-top-right-radius: 70px;
}

html[dir="rtl"] .nav-arrows {
  right: auto;
  left: 30px;
}

html[dir="rtl"] .arrow-icon {
  clip-path: polygon(0 50%, 100% 100%, 100% 0);
}

html[dir="rtl"] .arrow-icon.next-icon {
  transform: rotate(0deg);
}

html[dir="rtl"] .phone-prefix {
  border-right: 1px solid var(--border-input);
  border-left: none;
  border-radius: 0 8px 8px 0;
}

html[dir="rtl"] .phone-input {
  border-left: 1px solid var(--border-input);
  border-right: none;
  border-radius: 8px 0 0 8px;
}

html[dir="rtl"] .flag-icon {
  left: auto;
  right: 12px;
}

html[dir="rtl"] .country-select {
  padding: 0 40px 0 32px;
}

html[dir="rtl"] .select-arrow {
  right: auto;
  left: 10px;
}

/* RTL Mobile */
@media (max-width: 768px) {
  html[dir="rtl"] .signup-form-wrapper {
    padding: 80px 20px 30px 20px;
  }
  
  html[dir="rtl"] .signup-logo {
    right: 20px;
  }
  
  html[dir="rtl"] .signup-image {
    border-top-left-radius: 0;
    border-top-right-radius: 0;
  }
}