/*
 * Main stylesheet for Rivera Brothers Construction & Remodeling
 * This CSS defines a modern, clean layout with responsive design for all devices.
 */

/* CSS Variables for consistent theming */
:root {
  --nav-bg: #ffffff;
  --nav-text: #1a374d;
  --nav-border: #e5e7eb;
  --primary: #1a374d;
  --secondary: #406882;
  --accent: #6998ab;
  /* A warmer background tone for a more welcoming feel */
  --light-bg: #f9f6f0;
  --dark-bg: #0e1e2c;
  --white: #ffffff;
  --text-color: #444444;
  --heading-color: #1a374d;
}

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

body {
  font-family: 'Montserrat', sans-serif;
  background-color: var(--light-bg);
  color: var(--text-color);
  line-height: 1.6;
}

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

/* Navigation styling */
header {
  background-color: var(--nav-bg);
  position: sticky;
  top: 0;
  width: 100%;
  z-index: 1000;
  border-bottom: 1px solid var(--nav-border);
}

.nav-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 0;
}

.logo {
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--heading-color);
}

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

.nav-links li a {
  color: var(--nav-text);
  text-decoration: none;
  font-weight: 600;
  transition: color 0.3s ease;
}

.nav-links li a:hover {
  color: var(--accent);
}

/* Hero section */
.hero {
  height: 80vh;
  background-image: linear-gradient(rgba(0, 0, 0, 0.55), rgba(0, 0, 0, 0.55)), url('website_images/bathroom1.jpg');
  background-size: cover;
  background-position: center;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: var(--white);
}

.hero-overlay h1 {
  font-size: 2.8rem;
  margin-bottom: 0.6rem;
  font-weight: 700;
}

.hero-overlay p {
  font-size: 1.2rem;
  margin-bottom: 1.5rem;
}

/* Buttons */
.btn {
  display: inline-block;
  padding: 0.8rem 1.6rem;
  border-radius: 4px;
  text-decoration: none;
  font-weight: 600;
  transition: background-color 0.3s ease, color 0.3s ease;
}

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

.primary-btn:hover {
  background-color: var(--secondary);
}

.secondary-btn {
  background-color: var(--primary);
  color: var(--white);
}

.secondary-btn:hover {
  background-color: var(--secondary);
}

/* Section styling */
.section {
  padding: 4rem 0;
}

.section h2 {
  text-align: center;
  margin-bottom: 2rem;
  font-size: 2rem;
  color: var(--heading-color);
}

/* About section */
.about p {
  margin-bottom: 1rem;
  font-size: 1.05rem;
}

/* Services grid */
.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
}

.service-card {
  background-color: var(--white);
  border-radius: 8px;
  padding: 2rem 1.5rem;
  text-align: center;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease;
}

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

.service-icon {
  font-size: 2.2rem;
  color: var(--accent);
  margin-bottom: 1rem;
}

/* Why remodel list */
.benefits-list {
  list-style: none;
  max-width: 800px;
  margin: 0 auto;
  padding: 0;
}

.benefits-list li {
  margin-bottom: 1rem;
  line-height: 1.5;
  font-size: 1rem;
}

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

.portfolio-item {
  overflow: hidden;
  border-radius: 8px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

/* Gallery grid styling (similar to portfolio but for the separate gallery page) */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
}

.gallery-item {
  overflow: hidden;
  border-radius: 8px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.gallery-item:hover img {
  transform: scale(1.05);
}

.portfolio-item img {
  width: 100%;
  height: auto;
  display: block;
  transition: transform 0.4s ease;
}

.portfolio-item img:hover {
  transform: scale(1.05);
}

/* Contact section */
.contact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
}

.contact-info h2 {
  margin-bottom: 1rem;
  color: var(--heading-color);
}

.contact-info p {
  margin-bottom: 1rem;
}

.contact-details {
  list-style: none;
  padding: 0;
}

.contact-details li {
  margin-bottom: 0.8rem;
  font-size: 1.1rem;
  display: flex;
  align-items: center;
  color: var(--heading-color);
}

.contact-details li i {
  margin-right: 0.6rem;
  color: var(--accent);
  font-size: 1.2rem;
}

.contact-details li a {
  color: var(--heading-color);
  text-decoration: none;
}

.contact-details li a:hover {
  text-decoration: underline;
}

.contact-form form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.form-group label {
  display: block;
  margin-bottom: 0.3rem;
  font-weight: 500;
  color: var(--heading-color);
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 0.8rem;
  border: 1px solid #cccccc;
  border-radius: 4px;
  font-size: 1rem;
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(106, 152, 171, 0.3);
}

.contact-form button {
  align-self: flex-start;
}

/* Footnotes */
.footnotes {
  font-size: 0.85rem;
  color: #555555;
  background-color: var(--light-bg);
}

.footnotes ol {
  padding-left: 1.5rem;
}

.footnotes li {
  margin-bottom: 0.4rem;
}

/* Footer */
footer {
  background-color: var(--dark-bg);
  color: var(--white);
  padding: 1.5rem 0;
}

.footer-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  text-align: center;
}

.social-links a {
  color: var(--white);
  margin: 0 0.5rem;
  font-size: 1.5rem;
  transition: color 0.3s ease;
}

.social-links a:hover {
  color: var(--accent);
}

/* Responsive typography */
@media (max-width: 768px) {
  .hero-overlay h1 {
    font-size: 2.2rem;
  }
  .hero-overlay p {
    font-size: 1rem;
  }
  .section {
    padding: 3rem 0;
  }
  .benefits-list li {
    font-size: 0.95rem;
  }
}

/* Mobile menu toggle button (hidden on desktop) */
.menu-toggle {
  display: none;
  background: var(--nav-bg);
  color: var(--nav-text);
  border: 1px solid var(--nav-border);
  padding: 0.5rem 0.75rem;
  border-radius: 8px;
  cursor: pointer;
}

.menu-toggle i {
  font-size: 1.25rem;
}

/* Mobile navigation */

/* Responsive nav */
@media (max-width: 900px) {
  .nav-bar { position: relative; }
  .menu-toggle { display: inline-flex; align-items: center; gap: .5rem; padding: .5rem .75rem; }
  .menu-label { font-weight: 600; }
  .nav-links {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--nav-bg);
    border-bottom: 1px solid var(--nav-border);
    display: none;
    flex-direction: column;
    padding: 0.75rem 1rem 1rem 1rem;
    z-index: 1001;
    box-shadow: 0 8px 24px rgba(0,0,0,0.06);
  }
  .nav-links.open { display: flex; }
  .nav-links li a { padding: 0.5rem 0.25rem; font-size: 1.05rem; }
  body.nav-open { overflow: hidden; } /* prevent page jump while menu open */
}
