/* Reset */
* {
  margin: 0; padding: 0; box-sizing: border-box;
}

body, html {
  height: 100%;
  font-family: 'Poppins', sans-serif;
  overflow: hidden;
  background: #f7f9fc;
}

/* Loader */
#loader {
  position: fixed;
  z-index: 9999;
  background: #ffffff;
  height: 100vh;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.spinner {
  border: 8px solid #f3f3f3;
  border-top: 8px solid #FFD700;
  border-radius: 50%;
  width: 60px;
  height: 60px;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Container hidden until loader ends */
.container {
  display: none;
  height: 100vh;
  width: 100%;
  flex-direction: column;
}

/* Header styling */
header {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 1.5rem 1rem;
  background-color: transparent;
  text-align: center;
}

.slogan-background {
  background: linear-gradient(90deg, #ffd700cc, #ffaa0088);
  padding: 20px 40px;
  border-radius: 12px;
  box-shadow: 0 6px 15px rgba(255, 215, 0, 0.5);
  max-width: 600px;
  width: 90%;
}

.slogan {
  font-weight: 600;
  font-size: 1.6rem;
  line-height: 1.3;
  letter-spacing: 0.04em;
  color: #222;
}

.slogan .highlight {
  color: #fff;
  display: block;
  margin-top: 0.1rem;
  text-shadow: 1px 1px 4px rgba(0,0,0,0.6);
}

/* Main split container */
.main-content {
  display: flex;
  height: 100%;
  width: 100%;
}

.half {
  flex: 1;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  overflow: hidden;
  transition: transform 0.3s ease;
}

.half:hover {
  transform: scale(1.03);
}

/* Mortgage Side */
.mortgage {
  background: url('https://images.pexels.com/photos/106399/pexels-photo-106399.jpeg?auto=compress&cs=tinysrgb&dpr=2&h=900&w=1600') no-repeat center center/cover;
  color: white;
  overflow: hidden;
}

.mortgage::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(0,0,0,0.7), rgba(0,0,0,0.3));
  z-index: 1;
  transition: background 0.5s ease;
}

.mortgage:hover::before {
  background: linear-gradient(135deg, rgba(0,0,0,0.5), rgba(0,0,0,0.1));
}

/* Shimmer effect */
.mortgage::after {
  content: "";
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: linear-gradient(120deg, rgba(255, 255, 255, 0.1) 0%, rgba(255, 255, 255, 0.3) 50%, rgba(255, 255, 255, 0.1) 100%);
  transform: rotate(25deg);
  animation: shimmer 3s infinite;
  pointer-events: none;
  z-index: 1;
  mix-blend-mode: screen;
}

@keyframes shimmer {
  0% {
    transform: translateX(-100%) rotate(25deg);
  }
  100% {
    transform: translateX(100%) rotate(25deg);
  }
}

.mortgage .overlay {
  position: relative;
  z-index: 2;
  text-align: center;
  max-width: 450px;
  padding: 40px 30px;
  border-radius: 15px;
  background: rgba(0, 0, 0, 0.45);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.6);
  transition: background 0.4s ease;
}

.mortgage:hover .overlay {
  background: rgba(0, 0, 0, 0.6);
}

.mortgage .overlay h1 {
  font-size: 3rem;
  font-weight: 800;
  margin-bottom: 15px;
  text-shadow: 2px 2px 8px rgba(0,0,0,0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
}

/* Decorative icon (house SVG) */
.mortgage .overlay h1::before {
  content: '';
  display: inline-block;
  width: 30px;
  height: 30px;
  background-image: url('data:image/svg+xml;utf8,<svg fill="white" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M10 20v-6h4v6h5v-8h3L12 3 2 12h3v8z"/></svg>');
  background-size: contain;
  background-repeat: no-repeat;
}

.mortgage .overlay p {
  font-size: 1.2rem;
  margin-bottom: 25px;
  font-weight: 400;
  font-style: italic;
  color: #f0f0f0;
}

/* Glowing button */
.mortgage .overlay button {
  background-color: #FFD700;
  color: #222;
  padding: 15px 40px;
  font-size: 1.1rem;
  font-weight: 700;
  border: none;
  border-radius: 30px;
  cursor: pointer;
  box-shadow: 0 0 15px #FFD700;
  transition: box-shadow 0.3s ease;
}

.mortgage .overlay button:hover {
  box-shadow: 0 0 30px #ffea00;
  background-color: #ffea00;
  color: #111;
}

/* Insurance Side */
.insurance {
  background: url('https://images.unsplash.com/photo-1506744038136-46273834b3fb?auto=format&fit=crop&w=1470&q=80') no-repeat center center/cover;
  color: white;
  position: relative;
}

.insurance::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(0, 75, 135, 0.75), rgba(0, 150, 255, 0.75));
  z-index: 1;
}

.insurance .overlay {
  position: relative;
  z-index: 2;
  text-align: center;
  max-width: 400px;
  padding: 40px 30px;
  border-radius: 15px;
  background: rgba(0,0,0,0.35);
  box-shadow: 0 8px 32px rgba(0,0,0,0.4);
}

.insurance .overlay h1 {
  font-size: 2.8rem;
  margin-bottom: 15px;
  font-weight: 700;
  line-height: 1.2;
}

.insurance .overlay p {
  font-size: 1.2rem;
  margin-bottom: 25px;
  font-weight: 400;
  line-height: 1.4;
  color: #f0f0f0;
  font-style: italic;
}

.insurance .overlay button {
  padding: 14px 32px;
  font-size: 1.1rem;
  font-weight: 700;
  border: none;
  border-radius: 30px;
  cursor: pointer;
  background-color: #FFD700;
  color: #000;
  box-shadow: 0 4px 15px rgba(255, 215, 0, 0.6);
  transition: background-color 0.3s;
}

.insurance .overlay button:hover {
  background-color: #e6c200;
}

/* Responsive */
@media (max-width: 900px) {
  .main-content {
    flex-direction: column;
  }
  .half {
    height: 50vh;
  }
  .overlay {
    max-width: 90%;
    padding: 30px 20px;
  }
  .mortgage .overlay h1 {
    font-size: 2.2rem;
  }
  .insurance .overlay h1 {
    font-size: 2rem;
  }
  .mortgage .overlay p,
  .insurance .overlay p {
    font-size: 1rem;
  }
}
