:root {
  --primary: #1a365d;
  --primary-light: #2c5282;
  --accent: #c0a062;
  --bg: #0f172a;
  --bg-alt: #1e293b;
  --surface: #ffffff;
  --text: #e2e8f0;
  --text-dark: #0f172a;
  --text-muted: #94a3b8;
  --border: #334155;
  --radius: 8px;
  --max-width: 1200px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
}

a { color: inherit; text-decoration: none; }

img { max-width: 100%; display: block; }

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* Navigation */
.navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  background: rgba(15, 23, 42, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}

.navbar .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-weight: 700;
  font-size: 1.1rem;
  color: #fff;
  letter-spacing: 0.5px;
}

.logo-img {
  height: 40px;
  width: auto;
  border-radius: 4px;
}

.logo-text span {
  display: block;
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--accent);
}

.nav-links {
  display: flex;
  gap: 2rem;
  list-style: none;
}

.nav-links a {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-muted);
  transition: color 0.2s;
}

.nav-links a:hover,
.nav-links a.active {
  color: #fff;
}

.nav-cta {
  background: var(--accent);
  color: var(--text-dark) !important;
  padding: 0.45rem 1rem;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 0.85rem;
}

.nav-cta:hover { opacity: 0.9; }

.mobile-toggle {
  display: none;
  background: none;
  border: none;
  color: #fff;
  font-size: 1.5rem;
  cursor: pointer;
}

/* Hero */
.hero {
  padding: 10rem 0 6rem;
  text-align: center;
  position: relative;
  overflow: hidden;
  background:
    linear-gradient(rgba(15, 23, 42, 0.82), rgba(15, 23, 42, 0.65)),
    url('hero.jpg') center/cover no-repeat;
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 50% 50%, rgba(192,160,98,0.06) 0%, transparent 60%);
  pointer-events: none;
}

.hero .container {
  position: relative;
  z-index: 1;
}

.hero h1 {
  font-size: clamp(2.2rem, 5vw, 4rem);
  font-weight: 800;
  line-height: 1.15;
  color: #fff;
  max-width: 800px;
  margin: 0 auto 1.25rem;
}

.hero p {
  font-size: clamp(1rem, 2vw, 1.25rem);
  color: var(--text-muted);
  max-width: 680px;
  margin: 0 auto 2.5rem;
}

.btn-group {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.85rem 1.75rem;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 0.95rem;
  transition: transform 0.15s, opacity 0.15s;
  border: none;
  cursor: pointer;
}

.btn:hover { transform: translateY(-2px); }

.btn-primary {
  background: var(--accent);
  color: var(--text-dark);
}

.btn-outline {
  background: transparent;
  color: #fff;
  border: 1px solid var(--border);
}

.btn-outline:hover { background: rgba(255,255,255,0.05); }

.btn-whatsapp {
  background: rgba(37, 211, 102, 0.12);
  color: #25d366;
  border-color: rgba(37, 211, 102, 0.25);
}
.btn-whatsapp:hover { background: rgba(37, 211, 102, 0.2); }

.btn-x {
  background: rgba(255, 255, 255, 0.08);
  color: #e2e8f0;
  border-color: rgba(255, 255, 255, 0.15);
}
.btn-x:hover { background: rgba(255, 255, 255, 0.14); }

.btn-facebook {
  background: rgba(24, 119, 242, 0.12);
  color: #1877f2;
  border-color: rgba(24, 119, 242, 0.25);
}
.btn-facebook:hover { background: rgba(24, 119, 242, 0.2); }

.btn-copy {
  background: rgba(148, 163, 184, 0.1);
  color: #94a3b8;
  border-color: rgba(148, 163, 184, 0.2);
}
.btn-copy:hover { background: rgba(148, 163, 184, 0.18); }

.btn-maps {
  background: rgba(234, 67, 53, 0.12);
  color: #ea4335;
  border-color: rgba(234, 67, 53, 0.25);
}
.btn-maps:hover { background: rgba(234, 67, 53, 0.2); }

/* Section Headers */
.section-header {
  text-align: center;
  margin-bottom: 3.5rem;
}

.section-label {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--accent);
  margin-bottom: 0.75rem;
}

.section-header h2 {
  font-size: clamp(1.6rem, 3vw, 2.4rem);
  font-weight: 700;
  color: #fff;
  max-width: 600px;
  margin: 0 auto;
}

/* Cards */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.5rem;
}

.card {
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
  transition: transform 0.2s, border-color 0.2s;
}

.card:hover {
  transform: translateY(-4px);
  border-color: var(--accent);
}

.card h3 {
  color: #fff;
  font-size: 1.15rem;
  margin-bottom: 0.6rem;
}

.card p, .card li {
  color: var(--text-muted);
  font-size: 0.9rem;
}

.card ul {
  list-style: none;
  padding: 0;
}

.card li {
  padding: 0.3rem 0;
  position: relative;
  padding-left: 1.2rem;
}

.card li::before {
  content: '—';
  position: absolute;
  left: 0;
  color: var(--accent);
}

/* Sections */
.section {
  padding: 5rem 0;
}

.section-alt { background: var(--bg-alt); }

/* Feature / Split */
.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}

.split-text h2 {
  font-size: clamp(1.5rem, 3vw, 2.2rem);
  color: #fff;
  margin-bottom: 1.25rem;
}

.split-text p {
  color: var(--text-muted);
  margin-bottom: 1.5rem;
}

.feature-list {
  list-style: none;
  padding: 0;
}

.feature-list li {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.6rem 0;
  color: var(--text-muted);
  font-size: 0.95rem;
}

.feature-list li::before {
  content: '\2713';
  color: var(--accent);
  font-weight: 700;
}

/* Portfolio Grid */
.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
}

.portfolio-item {
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform 0.2s;
}

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

.portfolio-thumb {
  height: 200px;
  background: var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: 0.85rem;
}

.portfolio-info {
  padding: 1.25rem;
}

.portfolio-info h3 {
  color: #fff;
  font-size: 1.05rem;
  margin-bottom: 0.3rem;
}

.portfolio-info p {
  color: var(--text-muted);
  font-size: 0.85rem;
  margin-bottom: 0.75rem;
}

.portfolio-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 1rem;
  margin-bottom: 0.75rem;
}

.portfolio-location,
.portfolio-map-link {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.78rem;
}

.portfolio-location {
  color: var(--text-muted);
}

.portfolio-map-link {
  color: var(--accent);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s;
}

.portfolio-map-link:hover {
  color: #d4b97a;
  text-decoration: underline;
}

.portfolio-status {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 0.25rem 0.6rem;
  border-radius: 999px;
}

.status-ongoing {
  background: rgba(34,197,94,0.12);
  color: #4ade80;
}

.status-completed {
  background: rgba(148,163,184,0.12);
  color: #94a3b8;
}

.status-commercial {
  background: rgba(192,160,98,0.12);
  color: var(--accent);
}

/* Contact */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
}

.contact-info h3 {
  color: #fff;
  margin-bottom: 1.5rem;
}

.contact-block {
  margin-bottom: 1.5rem;
}

.contact-block h4 {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--accent);
  margin-bottom: 0.25rem;
}

.contact-block a,
.contact-block p {
  color: var(--text-muted);
  font-size: 0.95rem;
}

.contact-block a:hover { color: #fff; }

.form-group {
  margin-bottom: 1.25rem;
}

.form-group label {
  display: block;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-muted);
  margin-bottom: 0.4rem;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 0.85rem 1rem;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: #fff;
  font-size: 0.95rem;
  transition: border-color 0.2s;
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--accent);
}

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

/* Footer */
.footer {
  border-top: 1px solid var(--border);
  padding: 4rem 0 2rem;
  background: var(--bg);
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 3rem;
  margin-bottom: 3rem;
}

.footer-logo {
  height: 48px;
  width: auto;
  border-radius: 6px;
  margin-bottom: 0.75rem;
}

.footer-brand h3 {
  color: #fff;
  font-size: 1.1rem;
  margin-bottom: 0.75rem;
}

.footer-brand p {
  color: var(--text-muted);
  font-size: 0.9rem;
  max-width: 300px;
  margin-bottom: 1rem;
}

.footer-brand a {
  color: var(--accent);
  font-size: 0.9rem;
}

.footer-brand a:hover { text-decoration: underline; }

.footer-col h4 {
  color: #fff;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 1rem;
}

.footer-col ul {
  list-style: none;
}

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

.footer-col a {
  color: var(--text-muted);
  font-size: 0.9rem;
  transition: color 0.2s;
}

.footer-col a:hover { color: #fff; }

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid var(--border);
  padding-top: 1.5rem;
  color: var(--text-muted);
  font-size: 0.8rem;
}

.socials {
  display: flex;
  gap: 1rem;
}

.socials a {
  color: var(--text-muted);
  font-size: 0.9rem;
}

.socials a:hover { color: #fff; }

/* Alerts */
.alert {
  padding: 1rem 1.25rem;
  border-radius: var(--radius);
  margin-bottom: 1.5rem;
  font-size: 0.95rem;
}

.alert-success {
  background: rgba(34, 197, 94, 0.1);
  border: 1px solid rgba(34, 197, 94, 0.3);
  color: #4ade80;
}

/* Floating WhatsApp Button */
.whatsapp-float {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 2000;
  width: 56px;
  height: 56px;
  background: #25d366;
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
  transition: transform 0.2s, box-shadow 0.2s;
}

.whatsapp-float:hover {
  transform: scale(1.08);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.35);
}

/* Responsive */
@media (max-width: 900px) {
  .split { grid-template-columns: 1fr; gap: 2rem; }
  .contact-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

.card {
  background: rgba(30, 41, 59, 0.35);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

/* Project Detail */
.project-detail-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 2rem;
}

.project-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1rem;
}

.project-gallery img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: var(--radius);
  cursor: pointer;
  transition: transform 0.2s;
}

.project-gallery img:hover {
  transform: scale(1.02);
}

.project-sidebar {
  position: sticky;
  top: 6rem;
}

.lightbox {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.92);
  z-index: 9999;
  justify-content: center;
  align-items: center;
  padding: 2rem;
}

.lightbox.active {
  display: flex;
}

@media (max-width: 768px) {
  .project-detail-grid { grid-template-columns: 1fr; }
  .project-sidebar { position: static; }
}

/* Admin */
.admin-form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}
.admin-cards-mobile {
  display: none;
}
.admin-card {
  background: rgba(30, 41, 59, 0.35);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem;
  margin-bottom: 1rem;
}
.admin-card h4 {
  margin: 0 0 0.5rem;
  color: #fff;
  font-size: 1rem;
}
.admin-card .meta {
  color: var(--text-muted);
  font-size: 0.85rem;
  margin-bottom: 0.75rem;
}
.admin-card .actions {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}
.admin-card .actions .btn,
.admin-card .actions button {
  flex: 1;
  min-width: 70px;
  justify-content: center;
}

#addProjectForm.active {
  max-height: 3000px !important;
  opacity: 1 !important;
  padding: 0 !important;
  margin-bottom: 3rem !important;
}

#moreFields {
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transition: max-height 0.4s ease, opacity 0.25s ease, margin 0.2s ease;
  margin-top: 0;
}
#moreFields.active {
  max-height: 2000px;
  opacity: 1;
}

.password-toggle-wrap {
  position: relative;
}
.password-toggle-wrap input {
  width: 100%;
}
.password-toggle {
  position: absolute;
  right: 0.6rem;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 0.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}
.password-toggle:hover {
  color: #fff;
}

@media (max-width: 640px) {
  .nav-links {
    display: none;
    position: absolute;
    top: 64px; left: 0; right: 0;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    flex-direction: column;
    padding: 1.5rem;
    gap: 1.25rem;
  }
  .nav-links.open { display: flex; }
  .mobile-toggle { display: block; }
  .logo { gap: 0.4rem; }
  .logo-img { height: 28px; max-width: 100px; border-radius: 3px; }
  .logo-text { font-size: 0.78rem; }
  .logo-text span { font-size: 0.55rem; letter-spacing: 1px; }
  .hero { padding: 7rem 0 4rem; }
  .section { padding: 3rem 0; }
  .footer-grid { grid-template-columns: 1fr; gap: 2rem; }
  .footer-bottom { flex-direction: column; gap: 0.75rem; text-align: center; }
  .btn-group { flex-direction: column; align-items: center; }
  .btn { width: 100%; max-width: 280px; justify-content: center; }

  /* Admin mobile */
  .admin-form-grid { grid-template-columns: 1fr !important; }
  .admin-table-desktop { display: none !important; }
  .admin-cards-mobile { display: block !important; }
  input, textarea, select {
    font-size: 16px !important;
    padding: 0.85rem 1rem !important;
    min-height: 48px;
  }
  .admin-action-btn {
    min-height: 44px;
    padding: 0.65rem 1rem;
    font-size: 0.9rem;
  }
  .admin-service-checkbox {
    padding: 0.5rem 0;
    font-size: 1rem;
  }
  .admin-service-checkbox input {
    width: 20px;
    height: 20px;
  }
}
