/*
 * iSwift Website stylesheet
 *
 * This file defines the core styling for the public pages of the iSwift
 * website. Colour tokens and type scales are derived from the supplied
 * theme palette documentation to ensure a consistent look and feel across
 * all pages. CSS variables live in :root so that colours can be reused
 * throughout the site. Sections share common spacing and container rules
 * to make layout predictable on both desktop and mobile devices.
 */

/* Colour palette (Jupiter + Mercury numerology) */
:root {
  --green: #2FBF71;
  --green-light: #6EE7A8;
  --yellow: #FFD54F;
  --yellow-dark: #F4B400;
  --sky: #64B5F6;
  --saffron: #F4B400;
  --surface: #FCFCF8;
  --text: #1F2937;
  --muted: #374151;
  --border: #E5E7EB;
  --bg-start: #FFF6E0;
  --bg-end: #F0FFF4;
}

/* Base typography */
html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen,
    Ubuntu, Cantarell, "Open Sans", "Helvetica Neue", sans-serif;
  line-height: 1.6;
  color: var(--text);
  background: linear-gradient(to bottom, var(--bg-start), var(--bg-end));
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6 {
  margin: 0 0 0.5em;
  font-weight: 700;
  line-height: 1.2;
  color: var(--text);
}

h1 { font-size: 2.75rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.375rem; }

p { margin: 0 0 1em; }

a {
  color: var(--text);
  text-decoration: none;
  transition: color 0.15s ease;
}

a:hover, a:focus {
  color: var(--green);
}

/* Utility classes */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
}

.section {
  padding: 4rem 0;
}

.text-center {
  text-align: center;
}

.grid {
  display: grid;
  gap: 1.5rem;
}

.btn {
  display: inline-block;
  font-size: 1rem;
  font-weight: 700;
  padding: 0.875rem 1.5rem;
  border-radius: 0.75rem;
  border: none;
  cursor: pointer;
  transition: transform 0.15s ease, filter 0.15s ease;
}

.btn:focus,
.btn:hover {
  transform: translateY(-2px);
  filter: brightness(1.05);
}

.btn-primary {
  background-image: linear-gradient(135deg, var(--green), var(--green-light));
  color: #ffffff;
}

.btn-secondary {
  background-image: linear-gradient(135deg, var(--yellow), var(--yellow-dark));
  color: #3B2F00;
}

.btn-light {
  background: #ffffff;
  color: var(--text);
  border: 1px solid var(--border);
}

/* Header */
header {
  position: sticky;
  top: 0;
  width: 100%;
  background: rgba(255,255,255,0.95);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(8px);
  z-index: 100;
}

/* Footer */
footer {
  padding: 2.5rem 0; /* increased height for contact details */
  background: rgba(255,255,255,0.95);
  border-top: 1px solid var(--border);
}

footer .divider {
  height: 1px;
  background: var(--border);
  margin: 1rem 0;
}

/* New 3-column layout */
.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.5rem;
}

.footer-col h4 {
  margin: 0 0 0.75rem;
  font-size: 1rem;
}

.footer-col ul { margin: 0; padding: 0; list-style: none; }
.footer-col li { margin: 0.25rem 0; display: flex; align-items: center; gap: 0.5rem; }
.footer-col a { color: var(--text); }
.footer-col a:hover { color: var(--green); }

.icon { width: 18px; height: 18px; object-fit: contain; display: inline-block; }
.social { display: flex; gap: 0.5rem; align-items: center; margin-top: 0.5rem; }

/* Floating WhatsApp */
.floating-whatsapp {
  position: fixed;
  right: 20px;
  bottom: 20px;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: #25D366;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 24px rgba(0,0,0,0.2);
  z-index: 1000;
  transition: transform 0.15s ease, filter 0.15s ease;
}
.floating-whatsapp img { width: 28px; height: 28px; filter: invert(1) brightness(200%); }
.floating-whatsapp:hover { transform: translateY(-2px); }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

header .nav-wrapper {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

header .logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 800;
  font-size: 1.25rem;
}

header .logo img {
  height: 36px;
  width: auto; /* keep image aspect ratio */
}

/* Navigation */
nav {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  font-size: 0.875rem;
}

nav a {
  padding: 0.25rem 0;
  position: relative;
}

/* Keep header buttons compact (<= 60% of header height) */
header nav .btn {
  font-size: 0.875rem;
  padding: 0.35rem 0.875rem;
  line-height: 1.2;
}

nav a::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -4px;
  width: 100%;
  height: 2px;
  background: var(--green);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.2s ease;
}

nav a:hover::after,
nav a:focus::after {
  transform: scaleX(1);
}

/* Mobile nav */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 4px;
  cursor: pointer;
}

.hamburger span {
  width: 20px;
  height: 2px;
  background: var(--text);
  transition: all 0.2s ease;
}

@media (max-width: 768px) {
  nav {
    position: fixed;
    top: 64px;
    right: 0;
    background: rgba(255,255,255,0.98);
    backdrop-filter: blur(8px);
    flex-direction: column;
    align-items: flex-start;
    padding: 1rem 2rem;
    width: 200px;
    max-height: 0;
    overflow: hidden;
    border-left: 1px solid var(--border);
    transition: max-height 0.3s ease;
  }
  nav.open {
    max-height: 400px;
  }
  .hamburger {
    display: flex;
  }
  nav a {
    width: 100%;
    padding: 0.5rem 0;
  }
}

/* Hero */
.hero {
  text-align: center;
  padding: 6rem 1rem;
  background: linear-gradient(to right, var(--bg-start), var(--bg-end));
}

.hero h1 {
  font-size: 2.75rem;
  margin-bottom: 1rem;
}

.hero p {
  font-size: 1.125rem;
  max-width: 40rem;
  margin: 0 auto 2rem;
  color: var(--muted);
}

.hero .buttons {
  display: flex;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
}

/* Cards */
.card {
  background: var(--surface);
  border-radius: 1rem;
  padding: 2rem;
  box-shadow: 0 10px 30px rgba(0,0,0,0.06);
  text-align: center;
  transition: transform 0.2s ease;
}

.card:hover {
  transform: translateY(-4px);
}

.card img {
  width: 100%;
  border-radius: 0.75rem;
  margin-bottom: 1rem;
}

/* Lists */
.list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.list li {
  padding-left: 1.5rem;
  position: relative;
  margin-bottom: 0.5rem;
  color: var(--muted);
}

.list li::before {
  content: '✔';
  position: absolute;
  left: 0;
  color: var(--green);
}

/* Forms */
.form-group {
  margin-bottom: 1rem;
}

.form-group label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 600;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid var(--border);
  border-radius: 0.5rem;
  font-size: 1rem;
  box-sizing: border-box;
}

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

form .btn {
  margin-top: 1rem;
}

/* Footer */
footer {
  background: #ffffff;
  border-top: 1px solid var(--border);
  text-align: center;
  padding: 2rem 1rem;
}

footer .links {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 1rem;
}

footer .divider {
  height: 3px;
  max-width: 420px;
  margin: 0.5rem auto;
  background: linear-gradient(90deg, transparent, var(--green), var(--yellow), var(--sky), transparent);
  border-radius: 3px;
}

/* Tables (admin) */
table {
  width: 100%;
  border-collapse: collapse;
}

th, td {
  padding: 0.75rem;
  border-bottom: 1px solid var(--border);
  text-align: left;
  font-size: 0.875rem;
}

th {
  background: var(--surface);
  font-weight: 600;
}

tr:nth-child(even) td {
  background: #fafafa;
}

/* Admin header */
.admin-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
}

.admin-header h1 {
  margin: 0;
}

.admin-nav a {
  margin-right: 1rem;
  font-weight: 500;
}

.admin-nav a:last-child {
  margin-right: 0;
}

/* Breadcrumb / page banner */
.page-banner {
  background: linear-gradient(135deg, var(--bg-start), var(--bg-end));
  padding: 3rem 1rem;
  text-align: center;
}

.page-banner h2 {
  font-size: 2.5rem;
  margin-bottom: 0.5rem;
}

.page-banner p {
  color: var(--muted);
  max-width: 600px;
  margin: 0 auto;
}

/* Responsive images */
img {
  max-width: 100%;
  height: auto;
}
