/* Base Styles & Variables */
:root {
  --primary-color: #0a2963;
  --primary-light: #1e3b7d;
  --primary-dark: #051d4a;

  --accent-color: #3a86ff;
  --accent-hover: #2a76ef;
  --text-light: #f8f9fa;
  --text-dark: #0f172a;
  --text-muted: #64748b;
  --bg-color: #0f172a;
  --card-bg: rgb(16, 35, 82);
  --border-color: #e2e8f0;
  --success: #10b981;
  --warning: #f59e0b;
  --danger: #ef4444;
  --box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1),
    0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --border-radius: 8px;
  --transition: all 0.3s ease;
  --max-width: 1200px;
}

/* Dark Mode (will be toggled via JavaScript) */
.dark-mode {
  --primary-color: #0d3580;
  --primary-light: #1e4298;
  --primary-dark: #072254;
  --accent-color: #60a5fa;
  --accent-hover: #3b82f6;
  --text-light: #f8f9fa;
  --text-dark: #f1f5f9;
  --text-muted: #94a3b8;
  --bg-color: #0f172a;
  --card-bg: #1e293b;
  --border-color: #334155;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px; /* Accounts for fixed header */
}

body {
  font-family: "Inter", sans-serif;
  background-color: var(--bg-color);
  color: var(--text-dark);
  line-height: 1.6;
  overflow-x: hidden;
}

.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 20px;
}

/* Accessibility */
.skip-link {
  position: absolute;
  top: -40px;
  left: 0;
  background: var(--primary-color);
  color: var(--text-light);
  padding: 8px 16px;
  z-index: 1001;
  transition: top 0.3s;
}

.skip-link:focus {
  top: 0;
}

/* Buttons & Links */
.btn {
  display: inline-block;
  font-weight: 500;
  text-align: center;
  padding: 12px 24px;
  border-radius: var(--border-radius);
  border: none;
  cursor: pointer;
  transition: var(--transition);
  text-decoration: none;
}

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

.btn-primary:hover,
.btn-primary:focus {
  background-color: var(--primary-dark);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(10, 41, 99, 0.2);
}

.btn-secondary {
  background-color: transparent;
  color: var(--text-light);
  border: 2px solid var(--primary-color);
}

.btn-secondary:hover,
.btn-secondary:focus {
  background-color: rgba(10, 41, 99, 0.08);
  transform: translateY(-2px);
}

.btn-sm {
  padding: 8px 16px;
  font-size: 0.9rem;
}

.text-link {
  color: var(--accent-color);
  text-decoration: none;
  position: relative;
}

.text-link:after {
  content: "";
  position: absolute;
  width: 0;
  height: 2px;
  bottom: -2px;
  left: 0;
  background-color: var(--accent-color);
  transition: width 0.3s;
}

.text-link:hover:after,
.text-link:focus:after {
  width: 100%;
}

/* Header & Navigation */
.header {
  background-color: var(--primary-color);
  color: var(--text-light);
  padding: 16px 0;
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  transition: var(--transition);
}

.header .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  display: flex;
  align-items: center;
}

.logo-img {
  height: 50px;
  width: auto;
  max-width: 100%;
}

.main-nav {
  display: flex;
  align-items: center;
}

.nav-list {
  display: flex;
  list-style: none;
}

.nav-list li {
  margin-left: 32px;
}

.nav-list a {
  color: var(--text-light);
  text-decoration: none;
  font-weight: 500;
  position: relative;
  padding: 8px 0;
  transition: var(--transition);
}

.nav-list a:after {
  content: "";
  position: absolute;
  width: 0;
  height: 2px;
  bottom: 0;
  left: 0;
  background-color: var(--accent-color);
  transition: width 0.3s;
}

.nav-list a:hover:after,
.nav-list a:focus:after,
.nav-list a.active:after {
  width: 100%;
}

.mobile-menu-btn {
  display: none;
  background: transparent;
  border: none;
  cursor: pointer;
}

.mobile-menu-btn span {
  display: block;
  width: 25px;
  height: 3px;
  background-color: var(--text-light);
  margin: 5px 0;
  border-radius: 3px;
  transition: var(--transition);
}

/* Hero Section */
.hero {
  position: relative;
  background: linear-gradient(
    135deg,
    var(--primary-color) 0%,
    var(--primary-light) 100%
  );
  color: var(--text-light);
  padding: 120px 0;
  overflow: hidden;
  background-image: url("images/pool-installation.jpg");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.hero::after {
  content: "";
  position: absolute;
  bottom: -5px;
  left: 0;
  width: 100%;
  height: 60px;
  background-color: var(--bg-color);
  clip-path: polygon(0 50%, 100% 0, 100% 100%, 0% 100%);
}

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

.hero-content {
  max-width: 600px;
  backdrop-filter: blur(3px);
  padding: 40px;
  border-radius: var(--border-radius);
}

.hero-content h2 {
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 24px;
  line-height: 1.2;
}

.hero-content p {
  font-size: 1.1rem;
  margin-bottom: 32px;
  opacity: 0.9;
}

.hero-cta {
  display: flex;
  gap: 16px;
}

/* Services Section */
.services-section {
  padding: 80px 0;
  background-color: var(--bg-color);
}

.section-title {
  font-size: 3rem;
  text-align: center;
  margin-bottom: 16px;
  color: var(--text-light);
}

.section-description {
  text-align: center;
  max-width: 800px;
  margin: 0 auto 40px;
  color: var(--text-light);
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 30px;
  margin-top: 48px;
}

.service-card {
  background-color: rgb(6, 18, 71);
  padding: 0 0 24px 0;
  border-radius: var(--border-radius);
  box-shadow: var(--box-shadow);
  transition: var(--transition);
  text-align: center;
  overflow: hidden;
}

.service-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
}

.service-image {
  width: 100%;
  height: 200px;
  margin: 0 auto 20px;
  overflow: hidden;
  border-radius: 0;
  position: relative;
}

.service-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: var(--transition);
}

.service-card:hover .service-image img {
  transform: scale(1.05);
}

.service-card h3 {
  margin-bottom: 16px;
  font-size: 1.5rem;
  color: var(--text-light);
  padding: 0 20px;
}

.service-card p {
  color: var(--text-light);
  padding: 0 20px;
}

/* About Section */
.about-section {
  padding: 80px 0;
  background-color: var(--bg-color);
}

.about-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
  margin-top: 40px;
}

.about-text p {
  margin-bottom: 24px;
  font-size: 1.1rem;
  color: var(--text-light);
}

.about-features {
  margin-top: 32px;
}

.feature {
  display: flex;
  align-items: flex-start;
  margin-bottom: 24px;
}

.feature-icon {
  width: 50px;
  height: 50px;
  min-width: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: var(--text-light);

  border-radius: 50%;
  margin-right: 16px;
}

.feature-icon i {
  font-size: 0.95rem;
  color: var(--primary-color);
}

.feature-text h4 {
  margin-bottom: 8px;
  color: var(--text-light);
  font-size: 1.25rem;
}
.feature-text p {
  color: var(--text-light);
  font-size: 1rem;
}

.about-image img {
  width: 100%;
  border-radius: var(--border-radius);
  box-shadow: var(--box-shadow);
}

/* Contact Section */
.contact-section {
  padding: 80px 0;
  background-color: var(--bg-color);
}

.contact-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  margin-top: 40px;
}

.contact-info {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.info-item {
  display: flex;
  align-items: flex-start;
}

.info-icon {
  width: 50px;
  height: 50px;
  min-width: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: var(--text-light);
  border-radius: 50%;
  margin-right: 16px;
}

.info-icon i {
  font-size: 1.075rem;
  color: var(--primary-color);
}

.info-item h4 {
  margin-bottom: 8px;
  color: var(--text-light);
  font-size: 1.25rem;
}

.info-item a {
  color: var(--text-light);
  text-decoration: none;
  transition: var(--transition);
}
.info-item p {
  color: var(--text-light);
}

.info-item a:hover {
  color: var(--accent-color);
}

.contact-form {
  background-color: var(--card-bg);
  padding: 32px;
  border-radius: var(--border-radius);
  box-shadow: var(--box-shadow);
}

.form-group {
  margin-bottom: 24px;
}

.form-group label {
  display: block;
  margin-bottom: 8px;
  font-weight: 500;
  color: var(--text-light);
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 12px;
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  background-color: var(--bg-color);
  color: var(--text-light);
  transition: var(--transition);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--accent-color);
  box-shadow: 0 0 0 2px rgba(58, 134, 255, 0.1);
}

.error-message {
  color: var(--danger);
  font-size: 0.8rem;
  margin-top: 4px;
  display: none;
}

.error-message.show {
  display: block;
}

input.error,
select.error,
textarea.error {
  border-color: var(--danger);
}

.submit-btn {
  margin-top: 16px;
  width: 100%;
}

/* Footer */
.footer {
  background-color: var(--primary-color);
  color: var(--text-light);
  padding: 60px 0 20px;
}

.footer-content {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 40px;
  margin-bottom: 40px;
}

.footer-logo h2 {
  font-size: 1.6rem;
  margin-bottom: 16px;
}

.footer-logo span {
  color: var(--accent-color);
}

.footer-logo p {
  opacity: 0.8;
}

.footer-links h3,
.footer-contact h3 {
  font-size: 1.2rem;
  margin-bottom: 16px;
  position: relative;
  display: inline-block;
}

.footer-links h3:after,
.footer-contact h3:after {
  content: "";
  position: absolute;
  width: 100%;
  height: 2px;
  bottom: -4px;
  left: 0;
  background-color: var(--accent-color);
}

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

.footer-links a {
  color: var(--text-light);
  opacity: 0.7;
  text-decoration: none;
  display: block;
  margin-bottom: 8px;
  transition: var(--transition);
}

.footer-links a:hover {
  opacity: 1;
  transform: translateX(5px);
}

.social-links {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 16px;
  justify-content: center;
}

.social-links a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  background-color: rgba(255, 255, 255, 0.1);
  color: var(--text-light);
  border-radius: 50%;
  transition: var(--transition);
}

.social-links a:hover {
  background-color: var(--accent-color);
  transform: translateY(-3px);
}

/* Social media brand colors on hover */
.social-links a[aria-label="Facebook"]:hover {
  background-color: #3b5998;
}

.social-links a[aria-label="Twitter"]:hover {
  background-color: #1da1f2;
}

.social-links a[aria-label="Instagram"]:hover {
  background-color: #e1306c;
}

.social-links a[aria-label="WhatsApp"]:hover {
  background-color: #25d366;
}

.social-links a[aria-label="LinkedIn"]:hover {
  background-color: #0077b5;
}

.social-links a[aria-label="TikTok"]:hover {
  background-color: #000000;
}

.copyright {
  text-align: center;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  opacity: 0.7;
  font-size: 0.9rem;
}

/* Success Message */
.success-message {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 1100;
  justify-content: center;
  align-items: center;
}

.success-message.active {
  display: flex;
  animation: fadeIn 0.3s ease-in-out;
}

.success-content {
  background-color: var(--card-bg);
  padding: 40px;
  border-radius: var(--border-radius);
  text-align: center;
  max-width: 400px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}

.success-content i {
  font-size: 3rem;
  color: var(--success);
  margin-bottom: 16px;
}

.success-content h3 {
  margin-bottom: 16px;
  color: var(--success);
}

.close-success {
  margin-top: 20px;
}

/* Back to Top Button */
.back-to-top {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 40px;
  height: 40px;
  background-color: var(--primary-color);
  color: white;
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  opacity: 0;
  transition: var(--transition);
  z-index: 900;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
}

.back-to-top.visible {
  opacity: 1;
}

.back-to-top:hover {
  background-color: var(--primary-dark);
  transform: translateY(-5px);
}

/* Animation Classes */
.animate-fade-in {
  animation: fadeIn 1s ease-in-out;
}

.animate-slide-up {
  animation: slideUp 1s ease-in-out;
}

.animate-slide-in-left {
  animation: slideInLeft 1s ease-in-out;
}

.animate-slide-in-right {
  animation: slideInRight 1s ease-in-out;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(50px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slideInLeft {
  from {
    opacity: 0;
    transform: translateX(-50px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translateX(50px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* Responsive Styles */
@media (max-width: 1024px) {
  .about-content,
  .contact-container {
    grid-template-columns: 1fr;
  }

  .about-image {
    order: -1;
    margin-bottom: 32px;
  }

  .contact-info {
    margin-bottom: 32px;
  }

  .footer-content {
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
  }

  .footer-logo {
    grid-column: 1 / -1;
    text-align: center;
    margin-bottom: 20px;
  }
}

@media (max-width: 768px) {
  .hero-content {
    padding: 30px;
  }

  .hero-content h2 {
    font-size: 2rem;
  }

  .nav-list {
    display: none;
    position: absolute;
    top: 70px;
    left: 0;
    width: 100%;
    flex-direction: column;
    background-color: var(--primary-color);
    padding: 20px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
  }

  .nav-list.active {
    display: flex;
  }

  .nav-list li {
    margin: 12px 0;
  }

  .mobile-menu-btn {
    display: block;
  }

  .hero-cta {
    flex-direction: column;
  }

  .footer-content {
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
  }

  .footer-links a {
    font-size: 0.95rem;
    padding: 4px 0;
  }

  .copyright {
    margin-top: 10px;
  }
}

@media (max-width: 480px) {
  .hero {
    padding: 80px 0;
  }

  .hero-content {
    padding: 20px;
  }

  .hero-content h2 {
    font-size: 1.8rem;
  }

  .section-title {
    font-size: 1.8rem;
  }

  .footer-content {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 25px;
  }

  .footer-logo {
    margin-bottom: 0;
  }

  .footer {
    padding: 40px 0 20px;
  }

  .footer-links h3:after,
  .footer-contact h3:after {
    left: 50%;
    transform: translateX(-50%);
  }

  .footer-links h3,
  .footer-contact h3 {
    width: 100%;
    text-align: center;
  }

  .footer-links ul {
    padding: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
  }

  .footer-links a:hover {
    transform: translateY(-3px);
  }

  .social-links {
    justify-content: center;
    margin: 15px auto;
    max-width: 280px;
    gap: 20px;
  }

  .social-links a {
    width: 42px;
    height: 42px;
    font-size: 1.1rem;
  }

  .service-card {
    padding: 0 0 16px 0;
  }

  .service-image {
    height: 160px;
  }
}
