/* ========= FOOTER CSS - USED BY ALL PAGES ========= */

/* CSS Variables for Footer */
:root {
  --footer-bg: #f8f4f0;
  --footer-text: #78350f;
  --footer-primary: #ea580c;
  --footer-accent: #f59e0b;
  --footer-border: #fed7aa;
  --footer-social-bg: rgba(234, 88, 12, 0.1);
  --footer-social-text: #ea580c;
  --footer-social-hover: #c2410c;
  --footer-input-bg: #fff7ed;
  --footer-input-text: #78350f;
  --footer-button-bg: #ea580c;
  --footer-button-text: white;
  --footer-button-hover: #c2410c;
}

.dark-theme {
  /* Dark Theme Variables */
  --footer-bg: #0f172a;
  --footer-text: #78350f;
  --footer-primary: #f59e0b;
  --footer-accent: #fbbf24;
  --footer-border: rgba(245, 158, 11, 0.3);
  --footer-social-bg: rgba(245, 158, 11, 0.2);
  --footer-social-text: #f59e0b;
  --footer-social-hover: #fbbf24;
  --footer-input-bg: #334155;
  --footer-input-text: #f1f5f9;
  --footer-button-bg: #f59e0b;
  --footer-button-text: #0f172a;
  --footer-button-hover: #fbbf24;
}

/* Footer General */
.footer {
  background-color: var(--footer-text);
  color: white;
  font-family: "Inter", sans-serif;
  width: 90vw;
  margin: 0 auto 10px;
  border-radius: 8px;
  box-sizing: border-box;
  padding: 3rem 1rem 5px;
  border: 1px solid var(--footer-border);
  transition: all 0.3s ease;
}

.footer-container {
  width: 100%;
  max-width: 1400px;
  margin: 0 auto;
}

/* Grid Layout */
.footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  margin-bottom: 2rem;
  color: white;
}

@media (min-width: 768px) {
  .footer-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .footer-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

/* Company Section */
.footer-company h3 {
  color: var(--footer-primary);
  margin-left: 0.5rem;
  transition: color 0.3s ease;
}

.footer-logo {
  display: flex;
  align-items: center;
  margin-bottom: 1rem;
}

.footer-logo-icon {
  width: 32px;
  height: 32px;
  background: linear-gradient(
    135deg,
    var(--footer-accent),
    var(--footer-primary)
  );
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 0.8rem;
  transition: all 0.3s ease;
}

.footer-company p {
  transition: color 0.3s ease;
}

/* Social Icons */
.footer-social a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  margin-right: 0.5rem;
  background-color: var(--footer-social-bg);
  border-radius: 8px;
  color: var(--footer-social-text);
  transition: all 0.3s;
}

.footer-social a:hover {
  background-color: var(--footer-social-hover);
  color: white;
}

/* Links */
.footer-grid h4 {
  font-weight: 700;
  margin-bottom: 1rem;
  color: var(--footer-accent);
  transition: color 0.3s ease;
}

.footer-grid ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-grid ul li {
  margin-bottom: 0.5rem;
}

.footer-grid ul li a {
  color: var(--footer-text);
  text-decoration: none;
  font-size: 0.875rem;
  transition: color 0.3s;
}

.footer-grid ul li a:hover {
  color: var(--footer-primary);
}

/* Newsletter Column */
.newsletter-column {
  display: flex;
  flex-direction: column;
}

.newsletter-column p {
  transition: color 0.3s ease;
}

/* Newsletter Form */
.newsletter-form {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  width: 100%;
}

.newsletter-form input {
  padding: 0.5rem;
  border-radius: 8px;
  border: 1px solid var(--footer-border);
  outline: none;
  width: 100%;
  box-sizing: border-box;
  font-family: "Inter", sans-serif;
  background-color: var(--footer-input-bg);
  color: var(--footer-input-text);
  transition: all 0.3s ease;
}

.newsletter-form input::placeholder {
  color: var(--footer-input-text);
  opacity: 0.7;
}

.newsletter-form input:focus {
  box-shadow: 0 0 0 2px rgba(234, 88, 12, 0.5);
}

.dark-theme .newsletter-form input:focus {
  box-shadow: 0 0 0 2px rgba(245, 158, 11, 0.5);
}

.dark-theme .newsletter-column p,
.dark-theme .footer-company,
.dark-theme .footer-bottom {
  color: white;
}

.newsletter-btn {
  padding: 0.5rem 1rem;
  border-radius: 8px;
  border: none;
  background-color: var(--footer-button-bg);
  color: var(--footer-button-text);
  cursor: pointer;
  transition: all 0.3s;
  font-family: "Inter", sans-serif;
  font-weight: 600;
  width: 100%;
  box-sizing: border-box;
}

.newsletter-btn:hover {
  background-color: var(--footer-button-hover);
}

@media (min-width: 640px) {
  .newsletter-form {
    flex-direction: row;
  }

  .newsletter-form input {
    flex: 1;
    min-width: 0;
  }

  .newsletter-btn {
    width: auto;
    min-width: 120px;
  }
}

/* Footer Bottom */
.footer-bottom {
  border-top: 1px solid var(--footer-border);
  padding-top: 1rem;
  text-align: center;
  color: var(--footer-text);
  font-size: 0.875rem;
  transition: all 0.3s ease;
}

/* Mobile Responsive */
@media (max-width: 768px) {
  .footer {
    width: 90vw;
    padding: 2rem 1rem 5px;
    margin: 0 auto 10px;
  }

  .footer-grid {
    gap: 1.5rem;
  }

  .newsletter-form {
    flex-direction: column;
  }

  .newsletter-btn {
    width: 100%;
  }
}

@media (max-width: 480px) {
  .footer {
    width: 95vw;
    padding: 1.5rem 0.75rem 5px;
    border-radius: 12px;
    margin: 0 auto 10px;
  }
}

/* ===== DARK THEME SPECIFIC FOOTER STYLES ===== */
.dark-theme .footer-logo-icon {
  background: linear-gradient(
    135deg,
    var(--footer-accent),
    var(--footer-primary)
  );
  color: var(--footer-bg);
}

.dark-theme .footer-social a:hover {
  transform: translateY(-2px);
}

.dark-theme .newsletter-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(245, 158, 11, 0.3);
}

/* Ensure dark theme variables are applied */
.dark-theme .footer {
  background: var(--footer-bg) !important;
  border: 1px solid var(--footer-border) !important;
}

.dark-theme .footer-company h3 {
  color: var(--footer-primary) !important;
}

.dark-theme .footer-grid h4 {
  color: var(--footer-primary) !important;
}

.dark-theme .footer-grid ul li a {
  color: white !important;
}

.dark-theme .footer-grid ul li a:hover {
  color: var(--footer-accent) !important;
}

.dark-theme .footer-social a {
  background: var(--footer-social-bg) !important;
  color: var(--footer-social-text) !important;
}

.dark-theme .footer-social a:hover {
  background: var(--footer-social-hover) !important;
  color: var(--footer-button-text) !important;
}

.dark-theme .newsletter-form input {
  background: var(--footer-input-bg) !important;
  color: var(--footer-input-text) !important;
  border: 1px solid var(--footer-border) !important;
}

.dark-theme .newsletter-btn {
  background: var(--footer-button-bg) !important;
  color: var(--footer-button-text) !important;
}

.dark-theme .newsletter-btn:hover {
  background: var(--footer-button-hover) !important;
}

.dark-theme .footer-bottom {
  border-top: 1px solid var(--footer-border) !important;
}
