/* =========================
   CONTACT PAGE - COMPLETE
========================= */

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Inter', sans-serif;
  background: linear-gradient(135deg, #1a1a1a 0%, #0d0d0d 100%);
  color: #eaeaea;
  line-height: 1.7;
}

/* =========================
   ANIMATED BACKGROUND
========================= */

.contact {
  max-width: 1400px;
  margin: 0 auto;
  padding: 120px 60px 80px;
  animation: pageLoad 0.6s ease-out;
  position: relative;
}

/* Floating Logo Background */
/* Full Page Background Logo (Same as About Page) */
body::before {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: url('../images/logo.webp') center center no-repeat;
  background-size: 100%;
  opacity: 0.12;
  z-index: -1;
  pointer-events: none;
  animation: logoPulse 8s ease-in-out infinite, logoFadeIn 1.2s ease-out;
}

@keyframes logoPulse {
  0%, 100% {
    opacity: 0.12;
    transform: scale(1);
  }
  50% {
    opacity: 0.08;
    transform: scale(1.02);
  }
}

@keyframes logoFadeIn {
  from {
    opacity: 0;
    transform: scale(0.8);
  }
  to {
    opacity: 0.12;
    transform: scale(1);
  }
}

/* Ensure content is above background */
.contact > * {
  position: relative;
  z-index: 1;
}

/* =========================
   PAGE HEADER
========================= */

.page-header {
  text-align: center;
  margin-bottom: 60px;
}

.page-header h1 {
  font-family: 'Playfair Display', serif;
  font-size: 3rem;
  font-weight: 600;
  color: #ffffff;
  margin-bottom: 20px;
}

.divider {
  width: 0;
  height: 4px;
  background: linear-gradient(90deg, #c6b08a, #a8916f);
  margin: 0 auto 25px;
  border-radius: 2px;
  animation: expandWidth 1s ease-out 0.3s forwards;
}

@keyframes expandWidth {
  to {
    width: 80px;
  }
}

.page-header p {
  font-size: 1.1rem;
  color: #c0c0c0;
  max-width: 600px;
  margin: 0 auto;
}

/* =========================
   OFFICES SECTION
========================= */

.offices-section {
  margin-bottom: 80px;
}

.offices-section h2 {
  font-family: 'Playfair Display', serif;
  font-size: 2.2rem;
  text-align: center;
  margin-bottom: 50px;
  color: #ffffff;
}

.offices-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 40px;
}

.office-card {
  background: rgba(255, 255, 255, 0.03);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 20px;
  overflow: hidden;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
  position: relative;
}

.office-card::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(198, 176, 138, 0.1), transparent);
  transition: left 0.5s ease;
}

.office-card:hover::after {
  left: 100%;
}

.office-card:hover {
  transform: translateY(-12px) scale(1.02);
  box-shadow: 0 25px 70px rgba(198, 176, 138, 0.3);
  border-color: rgba(198, 176, 138, 0.3);
}

.office-header {
  background: linear-gradient(135deg, rgba(198, 176, 138, 0.1), rgba(168, 145, 111, 0.1));
  padding: 30px;
  display: flex;
  align-items: center;
  gap: 15px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.office-header i {
  font-size: 2rem;
  color: #c6b08a;
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.1);
  }
}

.office-header h3 {
  font-family: 'Playfair Display', serif;
  font-size: 1.5rem;
  color: #ffffff;
  font-weight: 500;
}

.office-details {
  padding: 30px;
}

.detail-item {
  display: flex;
  gap: 20px;
  margin-bottom: 25px;
  padding-bottom: 25px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  opacity: 0;
  animation: fadeInLeft 0.6s ease-out forwards;
}

.detail-item:nth-child(1) { animation-delay: 0.7s; }
.detail-item:nth-child(2) { animation-delay: 0.8s; }
.detail-item:nth-child(3) { animation-delay: 0.9s; }
.detail-item:nth-child(4) { animation-delay: 1s; }

@keyframes fadeInLeft {
  from {
    opacity: 0;
    transform: translateX(-30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.detail-item:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

.detail-item i {
  font-size: 1.3rem;
  color: #c6b08a;
  min-width: 25px;
  margin-top: 5px;
  transition: all 0.3s ease;
}

.detail-item:hover i {
  transform: scale(1.2) rotate(10deg);
  color: #e6c79a;
}

.detail-item strong {
  display: block;
  color: #ffffff;
  font-size: 1rem;
  margin-bottom: 8px;
  font-weight: 500;
}

.detail-item p {
  color: #c0c0c0;
  font-size: 0.95rem;
  line-height: 1.6;
  margin: 0;
}

.detail-item a {
  color: #c6b08a;
  text-decoration: none;
  transition: color 0.3s ease;
}

.detail-item a:hover {
  color: #e6c79a;
}

.map-container {
  width: 100%;
  height: 300px;
  border-radius: 0 0 20px 20px;
  overflow: hidden;
  opacity: 0;
  animation: zoomIn 0.8s ease-out 1.1s forwards;
}

@keyframes zoomIn {
  from {
    opacity: 0;
    transform: scale(0.8);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.map-container iframe {
  width: 100%;
  height: 100%;
  filter: grayscale(20%) contrast(1.1);
  transition: filter 0.3s ease;
}

.office-card:hover .map-container iframe {
  filter: grayscale(0%) contrast(1);
}

/* =========================
   FORM SECTION
========================= */

.form-section {
  background: rgba(255, 255, 255, 0.03);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 20px;
  padding: 50px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
  opacity: 0;
  animation: slideInBottom 1s ease-out 0.6s forwards;
}

@keyframes slideInBottom {
  from {
    opacity: 0;
    transform: translateY(80px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.form-section h2 {
  font-family: 'Playfair Display', serif;
  font-size: 2rem;
  text-align: center;
  margin-bottom: 15px;
  color: #ffffff;
}

.form-subtitle {
  text-align: center;
  color: #c0c0c0;
  margin-bottom: 40px;
  font-size: 1rem;
}

form {
  max-width: 900px;
  margin: 0 auto;
}

.form-row {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 25px;
  margin-bottom: 25px;
}

.form-group {
  display: flex;
  flex-direction: column;
  transition: all 0.3s ease;
}

.form-group:focus-within {
  transform: translateX(5px);
}

.form-group label {
  color: #ffffff;
  font-size: 0.95rem;
  margin-bottom: 10px;
  font-weight: 500;
  transition: all 0.3s ease;
}

.form-group:focus-within label {
  color: #c6b08a;
  transform: translateY(-2px);
}

.form-group label i {
  color: #c6b08a;
  margin-right: 8px;
}

.form-group input,
.form-group select,
.form-group textarea {
  padding: 15px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  color: #ffffff;
  font-family: 'Inter', sans-serif;
  font-size: 0.95rem;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: #c6b08a;
  background: rgba(255, 255, 255, 0.08);
  box-shadow: 0 0 0 3px rgba(198, 176, 138, 0.1);
  transform: scale(1.02);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
  color: #888;
}

.form-group select {
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23c6b08a' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 15px center;
  padding-right: 40px;
}

.form-group select option {
  background: #1a1a1a;
  color: #ffffff;
  padding: 10px;
}

.form-group select option:first-child {
  color: #888;
  font-style: italic;
}

.form-group select option:disabled {
  color: #666;
}

.form-group textarea {
  resize: vertical;
  min-height: 150px;
}

.btn {
  width: 100%;
  padding: 16px 32px;
  background: transparent;
  border: 2px solid #c6b08a;
  color: #c6b08a;
  font-size: 1rem;
  font-weight: 500;
  letter-spacing: 1px;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  margin-top: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  position: relative;
  overflow: hidden;
}

.btn::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(198, 176, 138, 0.3);
  transform: translate(-50%, -50%);
  transition: width 0.6s, height 0.6s;
}

.btn:hover::before {
  width: 300px;
  height: 300px;
}

.btn i,
.btn span {
  position: relative;
  z-index: 1;
}

.btn:hover {
  background: #c6b08a;
  color: #111;
  transform: translateY(-3px);
  box-shadow: 0 10px 30px rgba(198, 176, 138, 0.4);
}

.btn i {
  font-size: 1.1rem;
}

/* =========================
   FORM VALIDATION STYLES
========================= */

.form-group input.error,
.form-group select.error,
.form-group textarea.error {
  border-color: #f44336 !important;
  animation: shake 0.5s;
}

.form-group input.success,
.form-group select.success,
.form-group textarea.success {
  border-color: #4CAF50 !important;
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-10px); }
  75% { transform: translateX(10px); }
}

.error-message {
  color: #f44336;
  font-size: 0.85rem;
  margin-top: 5px;
  display: flex;
  align-items: center;
  gap: 5px;
}

.error-message::before {
  content: "⚠️";
  font-size: 0.9rem;
}

/* Input focus states */
.form-group input:focus:valid,
.form-group select:focus:valid,
.form-group textarea:focus:valid {
  border-color: #4CAF50;
}

.form-group input:focus:invalid,
.form-group select:focus:invalid,
.form-group textarea:focus:invalid {
  border-color: #f44336;
}

/* =========================
   ANIMATIONS
========================= */

@keyframes pageLoad {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.fade-in {
  opacity: 0;
  transform: translateY(40px);
  animation: fadeInUp 0.8s ease-out forwards;
}

.fade-in:nth-child(1) {
  animation-delay: 0.1s;
}

.fade-in:nth-child(2) {
  animation-delay: 0.3s;
}

.fade-in:nth-child(3) {
  animation-delay: 0.5s;
}

@keyframes fadeInUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Scroll Reveal Animation */
.scroll-reveal {
  opacity: 0;
  transform: translateY(50px);
  transition: all 0.6s ease-out;
}

.scroll-reveal.active {
  opacity: 1;
  transform: translateY(0);
}

/* =========================
   RESPONSIVE
========================= */

@media (max-width: 1024px) {
  .offices-grid {
    grid-template-columns: 1fr;
    gap: 30px;
  }
}

@media (max-width: 768px) {
  .contact {
    padding: 100px 30px 60px;
  }

  .page-header h1 {
    font-size: 2.5rem;
  }

  .offices-section h2 {
    font-size: 1.8rem;
  }

  .office-header {
    padding: 25px;
  }

  .office-details {
    padding: 25px;
  }

  .form-section {
    padding: 35px 25px;
  }

  .form-row {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .office-card {
    animation: none;
  }
  
  .btn:hover::before {
    width: 200px;
    height: 200px;
  }
}

@media (max-width: 480px) {
  .contact {
    padding: 90px 20px 50px;
  }

  .page-header h1 {
    font-size: 2rem;
  }

  .office-header h3 {
    font-size: 1.2rem;
  }

  .form-section {
    padding: 30px 20px;
  }
  
}

/* =========================
   TOAST NOTIFICATIONS
========================= */

.toast {
  position: fixed;
  bottom: 30px;
  right: 30px;
  padding: 14px 22px;
  border-radius: 10px;
  font-size: 0.95rem;
  color: #fff;
  z-index: 9999;
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.4s ease;
  max-width: 360px;
  box-shadow: 0 8px 30px rgba(0,0,0,0.4);
}
.toast.show { opacity: 1; transform: translateY(0); }
.toast-success { background: #2e7d32; border-left: 4px solid #4CAF50; }
.toast-error   { background: #b71c1c; border-left: 4px solid #f44336; }

/* Reduced Motion Preference */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
