/* CONTACT PAGE STYLES */

/* GLOBAL OVERFLOW PREVENTION */
html, body {
  overflow-x: hidden;
  max-width: 100vw;
  width: 100%;
}

* {
  box-sizing: border-box;
  max-width: 100%;
}

/* CONTAINER SAFETY */
.container {
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
  padding-left: 20px;
  padding-right: 20px;
}

/* LAYOUT SAFETY */
.contact-layout,
.contact-form-wrapper,
.contact-form,
.form-group,
.form-section {
  max-width: 100%;
  overflow-x: hidden;
}

/* IMAGE SAFETY */
img {
  max-width: 100%;
  height: auto;
}

/* FORM ELEMENT SAFETY */
input, textarea, select, button {
  max-width: 100%;
  box-sizing: border-box;
}

/* HERO SECTION */
.hero {
  position: relative;
  height: 100vh;
  min-height: 600px;
  background: linear-gradient(rgba(0, 0, 0, 0.4), rgba(0, 0, 0, 0.4)), url('../assets/contact-hero.jpg');
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: white;
  text-align: center;
  overflow: hidden;
  width: 100%;
}

.hero .overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.3);
  z-index: 1;
}

.hero-text {
  position: relative;
  z-index: 2;
  max-width: 900px;
  margin: 0 auto;
  padding: 0 20px;
}

.hero-text h1 {
  font-family: 'Butler Ultra Light', serif;
  font-size: 4rem;
  font-weight: 300;
  margin-bottom: 2rem;
  line-height: 1.2;
  color: white;
}

.hero-text p {
  font-size: 1.3rem;
  line-height: 1.6;
  color: white;
  margin-bottom: 0;
  font-weight: 300;
}

.scroll-arrow {
  position: absolute;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  animation: bounce 2s infinite;
}

.scroll-arrow span {
  font-size: 2rem;
  color: white;
  opacity: 0.8;
}

@keyframes bounce {
  0%, 20%, 50%, 80%, 100% {
    transform: translateX(-50%) translateY(0);
  }
  40% {
    transform: translateX(-50%) translateY(-10px);
  }
  60% {
    transform: translateX(-50%) translateY(-5px);
  }
}

/* CONTACT SECTION */
.contact-section {
  padding: 100px 0;
  background: #f8f5ef;
  width: 100%;
  overflow-x: hidden;
}

.contact-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: start;
  width: 100%;
  max-width: 100%;
}

.contact-image {
  position: sticky;
  top: 100px;
  width: 100%;
  max-width: 100%;
}

.contact-image img {
  width: 100%;
  height: auto;
  border-radius: 8px;
  object-fit: cover;
  max-width: 100%;
}

.contact-form-wrapper {
  max-width: 600px;
  width: 100%;
  max-height: 80vh;
  overflow-y: auto;
  padding-right: 10px;
  scrollbar-width: thin;
  scrollbar-color: #ccc #f0f0f0;
}

.contact-form-wrapper::-webkit-scrollbar {
  width: 8px;
}

.contact-form-wrapper::-webkit-scrollbar-track {
  background: #f0f0f0;
  border-radius: 4px;
}

.contact-form-wrapper::-webkit-scrollbar-thumb {
  background: #ccc;
  border-radius: 4px;
}

.contact-form-wrapper::-webkit-scrollbar-thumb:hover {
  background: #999;
}

.form-header {
  margin-bottom: 40px;
}

.form-header h2 {
  font-size: 2.5rem;
  font-weight: 700;
  color: #333;
  margin-bottom: 20px;
  line-height: 1.2;
}

/* FORM STYLES */
.contact-form {
  display: flex;
  flex-direction: column;
  gap: 30px;
  width: 100%;
  max-width: 100%;
}

.form-section {
  margin-top: 40px;
  padding-top: 30px;
  border-top: 2px solid #f0f0f0;
  width: 100%;
  max-width: 100%;
}

.form-section h3 {
  font-size: 1.8rem;
  font-weight: 600;
  color: #333;
  margin-bottom: 25px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
  max-width: 100%;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  width: 100%;
  max-width: 100%;
}

.form-field {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
  max-width: 100%;
}

.form-group label,
.form-field label {
  font-size: 1rem;
  font-weight: 500;
  color: #333;
  margin-bottom: 5px;
}

.form-group input,
.form-group textarea,
.form-group select,
.form-field input {
  padding: 12px 16px;
  border: 2px solid #e0e0e0;
  border-radius: 4px;
  font-size: 1rem;
  font-family: 'Inter', sans-serif;
  transition: border-color 0.3s ease;
  background: #fff;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus,
.form-field input:focus {
  outline: none;
  border-color: #333;
}

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

.form-group select {
  cursor: pointer;
}

/* CHECKBOX STYLES */
.checkbox-group {
  display: flex;
  flex-direction: column;
  gap: 15px;
  margin-top: 10px;
}

.checkbox-label {
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  font-size: 1rem;
  color: #333;
  transition: color 0.3s ease;
}

.checkbox-label input[type="checkbox"] {
  display: none;
}

.checkbox-custom {
  width: 20px;
  height: 20px;
  border: 2px solid #e0e0e0;
  border-radius: 3px;
  position: relative;
  transition: all 0.3s ease;
  flex-shrink: 0;
}

.checkbox-label input[type="checkbox"]:checked + .checkbox-custom {
  background: #333;
  border-color: #333;
}

.checkbox-label input[type="checkbox"]:checked + .checkbox-custom::after {
  content: '✓';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: white;
  font-size: 12px;
  font-weight: bold;
}

.checkbox-label:hover .checkbox-custom {
  border-color: #333;
}

/* SUBMIT BUTTON */
.form-submit {
  margin-top: 40px;
  padding-top: 30px;
  border-top: 2px solid #f0f0f0;
}

.submit-btn {
  width: 100%;
  padding: 18px 24px;
  background: #333;
  color: white;
  border: 2px solid #333;
  border-radius: 4px;
  font-size: 1.1rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  cursor: pointer;
  transition: all 0.3s ease;
  font-family: 'Inter', sans-serif;
}

.submit-btn:hover {
  background: transparent;
  color: #333;
  transform: translateY(-2px);
}

/* THANK YOU MODAL STYLES */
.thank-you-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.thank-you-modal.show {
  opacity: 1;
  visibility: visible;
}

.thank-you-content {
  background: white;
  padding: 60px 40px;
  border-radius: 15px;
  text-align: center;
  max-width: 500px;
  width: 90%;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  transform: translateY(30px);
  transition: transform 0.3s ease;
}

.thank-you-modal.show .thank-you-content {
  transform: translateY(0);
}

.thank-you-icon {
  font-size: 4rem;
  margin-bottom: 30px;
  animation: sparkle 2s ease-in-out infinite;
}

@keyframes sparkle {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.1); }
}

.thank-you-content h2 {
  font-size: 2.5rem;
  color: var(--black);
  margin-bottom: 25px;
  font-family: 'Butler Ultra Light', sans-serif;
}

.thank-you-content p {
  font-size: 1.1rem;
  color: var(--black);
  line-height: 1.7;
  margin-bottom: 20px;
}

.thank-you-close {
  background: var(--black);
  color: white;
  border: none;
  padding: 15px 30px;
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  border-radius: 5px;
  cursor: pointer;
  transition: all 0.3s ease;
  margin-top: 20px;
}

.thank-you-close:hover {
  background: #333;
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

/* RESPONSIVE DESIGN */
@media (max-width: 1024px) {
  .contact-layout {
    gap: 60px;
  }
  
  .hero-text h1 {
    font-size: 3.5rem;
  }
  
  .hero-text p {
    font-size: 1.2rem;
  }
}

@media (max-width: 768px) {
  .hero {
    background-attachment: scroll;
    min-height: 100vh;
    padding: 0 20px;
    width: 100%;
    max-width: 100vw;
  }
  
  .hero-text {
    max-width: 100%;
    width: 100%;
  }
  
  .hero-text h1 {
    font-size: 2.8rem;
  }
  
  .hero-text p {
    font-size: 1.1rem;
  }
  
  .contact-section {
    padding: 80px 0;
    width: 100%;
    max-width: 100vw;
  }
  
  .container {
    padding-left: 15px;
    padding-right: 15px;
    max-width: 100%;
    width: 100%;
  }
  
  .contact-layout {
    grid-template-columns: 1fr;
    gap: 40px;
    width: 100%;
    max-width: 100%;
  }
  
  .contact-image {
    position: static;
    order: -1;
    width: 100%;
    max-width: 100%;
  }
  
  .contact-form-wrapper {
    width: 100%;
    max-width: 100%;
    max-height: 70vh;
    overflow-y: auto;
    padding-right: 5px;
  }
  
  .form-header h2 {
    font-size: 2rem;
  }
  
  .form-section h3 {
    font-size: 1.5rem;
  }
  
  .form-row {
    grid-template-columns: 1fr;
    gap: 15px;
    width: 100%;
    max-width: 100%;
  }
  
  .form-field {
    width: 100%;
    max-width: 100%;
  }
  
  .form-group input,
  .form-group textarea,
  .form-group select {
    width: 100%;
    max-width: 100%;
  }
}

@media (max-width: 480px) {
  .hero {
    min-height: 100vh;
    padding: 0 15px;
    width: 100%;
    max-width: 100vw;
  }
  
  .hero-text {
    max-width: 100%;
    width: 100%;
    padding: 0 10px;
  }
  
  .hero-text h1 {
    font-size: 2.2rem;
    margin-bottom: 1.5rem;
  }
  
  .hero-text p {
    font-size: 1rem;
    line-height: 1.5;
  }
  
  .contact-section {
    padding: 60px 0;
    width: 100%;
    max-width: 100vw;
  }
  
  .container {
    padding: 0 10px;
    max-width: 100%;
    width: 100%;
  }
  
  .contact-layout {
    width: 100%;
    max-width: 100%;
  }
  
  .contact-form-wrapper {
    width: 100%;
    max-width: 100%;
    padding: 0;
    max-height: 60vh;
    overflow-y: auto;
    padding-right: 3px;
  }
  
  .form-header h2 {
    font-size: 1.8rem;
  }
  
  .form-section h3 {
    font-size: 1.3rem;
  }
  
  .contact-form {
    gap: 25px;
    width: 100%;
    max-width: 100%;
  }
  
  .form-section {
    margin-top: 30px;
    padding-top: 25px;
    width: 100%;
    max-width: 100%;
  }
  
  .form-group {
    width: 100%;
    max-width: 100%;
  }
  
  .form-row {
    width: 100%;
    max-width: 100%;
  }
  
  .form-field {
    width: 100%;
    max-width: 100%;
  }
  
  .form-group input,
  .form-group textarea,
  .form-group select {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
  }
}

@media (max-width: 360px) {
  .hero-text h1 {
    font-size: 1.8rem;
  }
  
  .hero-text p {
    font-size: 0.95rem;
  }
  
  .form-header h2 {
    font-size: 1.6rem;
  }
}

/* ADDITIONAL MOBILE OPTIMIZATIONS */
@media (max-width: 320px) {
  /* Extra small screens optimization */
  .hero-text h1 {
    font-size: 1.6rem;
  }
  
  .hero-text p {
    font-size: 0.9rem;
  }
  
  .form-header h2 {
    font-size: 1.4rem;
    margin-bottom: 15px;
  }
  
  .form-section h3 {
    font-size: 1.2rem;
  }
  
  .form-group input,
  .form-group textarea,
  .form-group select {
    padding: 10px 12px;
    font-size: 0.9rem;
  }
  
  .checkbox-label {
    font-size: 0.9rem;
  }
  
  .submit-btn {
    padding: 16px 20px;
    font-size: 1rem;
  }
}

/* MOBILE FORM IMPROVEMENTS */
@media (max-width: 768px) {
  .contact-form-wrapper {
    max-width: 100%;
  }
  
  .form-group input,
  .form-group textarea,
  .form-group select {
    font-size: 16px; /* Prevents zoom on iOS */
  }
  
  .checkbox-group {
    gap: 12px;
  }
  
  .checkbox-custom {
    width: 18px;
    height: 18px;
  }
  
  .form-submit {
    margin-top: 35px;
    padding-top: 25px;
  }
}

/* MOBILE TOUCH IMPROVEMENTS */
@media (max-width: 480px) {
  .checkbox-label {
    padding: 8px 0;
    min-height: 44px; /* Apple recommended touch target */
    display: flex;
    align-items: center;
  }
  
  .form-group input,
  .form-group textarea,
  .form-group select {
    min-height: 44px;
    padding: 12px 14px;
  }
  
  .submit-btn {
    min-height: 50px;
    font-size: 1rem;
    padding: 15px 24px;
  }
  
  .contact-image img {
    max-height: 400px;
    object-fit: cover;
  }
  
  .form-header {
    margin-bottom: 30px;
    text-align: center;
  }
  
  .form-section {
    margin-top: 25px;
    padding-top: 20px;
  }
}

/* MOBILE KEYBOARD HANDLING */
@media (max-width: 768px) {
  .form-group input:focus,
  .form-group textarea:focus,
  .form-group select:focus {
    transform: scale(1.02);
    transition: transform 0.2s ease;
  }
}

/* ULTRA SMALL SCREENS */
@media (max-width: 280px) {
  .container {
    padding: 0 10px;
  }
  
  .hero-text {
    padding: 0 10px;
  }
  
  .hero-text h1 {
    font-size: 1.4rem;
    line-height: 1.1;
  }
  
  .hero-text p {
    font-size: 0.85rem;
    line-height: 1.4;
  }
  
  .form-header h2 {
    font-size: 1.3rem;
  }
  
  .form-section h3 {
    font-size: 1.1rem;
  }
  
  .contact-form {
    gap: 20px;
  }
}

/* MOBILE NAVIGATION SPACING */
@media (max-width: 768px) {
  .contact-section {
    margin-top: 0;
    padding-top: 80px;
  }
}

@media (max-width: 480px) {
  .contact-section {
    padding-top: 60px;
  }
}

/* MOBILE FORM FIELD SPACING */
@media (max-width: 480px) {
  .form-group {
    margin-bottom: 20px;
  }
  
  .form-group label {
    margin-bottom: 8px;
    font-size: 0.95rem;
    line-height: 1.3;
  }
  
  .checkbox-group {
    margin-top: 8px;
  }
  
  .form-section {
    border-top: 1px solid #f0f0f0;
  }
  
  .form-submit {
    border-top: 1px solid #f0f0f0;
  }
}

/* MOBILE ACCESSIBILITY */
@media (max-width: 768px) {
  .checkbox-label:hover .checkbox-custom {
    border-color: #666;
  }
  
  .form-group input:focus,
  .form-group textarea:focus,
  .form-group select:focus {
    border-color: #000;
    box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.1);
  }
  
  .submit-btn:active {
    transform: translateY(1px);
  }
}

/* MOBILE LANDSCAPE SPECIFIC */
@media (max-width: 768px) and (orientation: landscape) {
  .hero {
    min-height: 100vh;
  }
  
  .hero-text {
    padding: 0 40px;
  }
  
  .hero-text h1 {
    font-size: 2.2rem;
    margin-bottom: 1rem;
  }
  
  .hero-text p {
    font-size: 1rem;
    line-height: 1.4;
  }
  
  .contact-section {
    padding: 60px 0;
  }
}

/* MOBILE PORTRAIT SPECIFIC */
@media (max-width: 480px) and (orientation: portrait) {
  .hero {
    padding: 0 20px;
  }
  
  .contact-layout {
    gap: 30px;
  }
  
  .contact-image {
    margin-bottom: 20px;
  }
  
  .contact-image img {
    border-radius: 6px;
  }
}

/* VERY WIDE MOBILE SCREENS */
@media (min-width: 481px) and (max-width: 768px) {
  .contact-layout {
    gap: 50px;
  }
  
  .form-row {
    grid-template-columns: 1fr 1fr;
    gap: 20px;
  }
  
  .form-header h2 {
    font-size: 2.2rem;
  }
  
  .form-section h3 {
    font-size: 1.6rem;
  }
}
