/* Rally Point Rentals - Main Stylesheet
 * 
 * Created as part of the dev plan implementation
 */

:root {
  /* Brand Colors - Updated from logo */
  --primary: #0D47A1; /* Blue from logo */
  --secondary: #D32F2F; /* Red from logo */
  --text: #333333;
  --light: #f8f9fa;
  --dark: #212529;
  --white: #ffffff;

  /* Typography - Updated */
  --heading-font: 'Montserrat', sans-serif;
  --body-font: 'Roboto', sans-serif;
}

/* Reset and Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: var(--body-font);
  color: var(--text);
  line-height: 1.6;
  background-color: var(--white);
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--heading-font);
  margin-bottom: 1rem;
  color: var(--primary);
}

a {
  color: var(--primary);
  text-decoration: none;
  transition: color 0.3s ease, background-color 0.3s ease;
}

a:hover {
  color: var(--secondary);
}

img {
  max-width: 100%;
  height: auto;
  display: block; /* Prevents bottom space under image */
}

/* Layout */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 15px;
}

.row {
  display: flex;
  flex-wrap: wrap;
  margin: 0 -15px; /* Gutter */
}

.col {
  flex: 1;
  padding: 0 15px; /* Gutter */
}

/* Header Styles */
.top-bar {
  background-color: var(--dark);
  color: var(--light);
  padding: 10px 0;
  font-size: 0.9rem;
}

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

.top-bar a {
  color: var(--light);
  margin-right: 20px;
}

.top-bar a:hover {
  color: var(--secondary);
}

.top-bar i {
    margin-right: 5px;
}

.main-header {
  padding: 15px 0;
  background-color: var(--white);
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  position: sticky;
  top: 0;
  z-index: 1000; /* Ensure header stays on top */
}

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

.logo {
  max-height: 90px; /* Adjust as needed */
}

.nav-menu {
  display: flex;
  list-style: none;
  flex-wrap: wrap;
  justify-content: flex-end;
  row-gap: 12px; /* Add vertical space between wrapped lines */
}

.nav-menu li {
  margin-left: 15px;
}

.nav-menu a {
  font-family: var(--heading-font);
  font-weight: 600;
  font-size: 1rem; /* Slightly larger for more modern feel */
  padding: 10px 15px;
  border-radius: 4px;
  color: var(--primary);
  white-space: nowrap;
}

.nav-menu a:hover,
.nav-menu a.active {
  background-color: var(--primary);
  color: var(--white);
}

/* Mobile Navigation */
.menu-toggle {
  display: none;
  font-size: 1.8rem;
  color: var(--primary);
  cursor: pointer;
}

/* Hero Section */
.hero {
  position: relative;
  min-height: 400px; /* Use min-height for flexibility */
  background-size: cover;
  background-position: center;
  color: var(--white);
  text-align: center;
  display: flex;
  flex-direction: column; /* Align content vertically */
  align-items: center;
  justify-content: center;
  padding: 40px 20px; /* Add padding for smaller screens */
}

.hero-content {
  z-index: 1;
  padding: 20px;
  background-color: rgba(0, 0, 0, 0.5); /* Darker overlay for better text contrast */
  border-radius: 8px;
}

.hero::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(rgba(0,0,0,0.3), rgba(0,0,0,0.3)); /* Subtle gradient overlay */
}

.hero h1 {
  color: var(--white);
  font-size: 2.8rem; /* Responsive font size */
  margin-bottom: 1rem;
  font-weight: 700;
}

.hero p {
  font-size: 1.3rem;
  max-width: 700px;
  margin: 0 auto 1.5rem;
  font-weight: 400;
}

.btn {
  display: inline-block;
  padding: 12px 30px;
  background-color: var(--secondary); /* Red for primary CTAs */
  color: var(--white) !important; /* Ensure text is white */
  border-radius: 5px;
  font-family: var(--heading-font);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  text-align: center;
  border: 2px solid transparent;
  transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}

.btn:hover {
  background-color: var(--primary); /* Blue on hover */
  border-color: var(--primary);
  color: var(--white) !important;
}

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

/* Sections */
.section {
  padding: 60px 0;
}

.section-title {
  text-align: center;
  margin-bottom: 50px;
  font-size: 2.2rem;
}

/* Features */
.features {
  text-align: center;
}

.feature-box {
  padding: 25px;
  margin-bottom: 30px;
}

.feature-box i {
  font-size: 3.5rem;
  color: var(--secondary); /* Red for icons */
  margin-bottom: 20px;
}

/* Catalog */
.catalog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); /* Slightly larger cards */
  gap: 30px;
}

.catalog-item {
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  background-color: var(--white);
}

.catalog-item:hover {
  transform: translateY(-8px);
  box-shadow: 0 8px 20px rgba(0,0,0,0.12);
}

.catalog-img {
  height: 220px;
  background-color: #f0f0f0;
  background-size: cover;
  background-position: center;
}

.catalog-content {
  padding: 20px;
}

.catalog-content h3 {
    margin-top: 0;
}

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

.footer h3 {
    color: var(--white);
    font-size: 1.4rem;
    margin-bottom: 20px;
}

.footer p, .footer li {
    color: #ccc; /* Lighter text for footer */
    margin-bottom: 8px;
}

.footer a {
  color: var(--secondary); /* Red for links in footer */
}

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

.social-links {
  display: flex;
  list-style: none;
  padding: 0;
  margin-bottom: 20px;
}

.social-links li {
  margin-right: 15px;
}

.social-links a {
  font-size: 1.5rem; /* Larger social icons */
  color: var(--light);
}

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

.footer-bottom {
  margin-top: 40px;
  padding-top: 20px;
  border-top: 1px solid rgba(255,255,255,0.15);
  text-align: center;
  font-size: 0.9rem;
  color: #aaa;
}

/* Admin Page Specific Styles */
.admin-container {
    padding: 20px;
}
.admin-section {
    background-color: #f8f9fa;
    padding: 20px;
    margin-bottom: 30px;
    border-radius: 5px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}
.admin-section h2 {
    margin-top: 0;
    border-bottom: 2px solid var(--primary);
    padding-bottom: 10px;
    margin-bottom: 20px;
}
table.crud-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
}
.crud-table th, .crud-table td {
    border: 1px solid #ddd;
    padding: 10px; /* Increased padding */
    text-align: left;
}
.crud-table th {
    background-color: var(--primary);
    color: white;
}
.crud-table tr:nth-child(even) {background-color: #f0f0f0;}
.crud-table input[type='text'], .crud-table textarea {
    width: 100%;
    padding: 8px;
    border: 1px solid #ccc;
    border-radius: 3px;
    font-family: var(--body-font);
}
.crud-table button, .admin-section button {
    background-color: var(--secondary);
    color: white;
    padding: 10px 18px;
    border: none;
    border-radius: 3px;
    cursor: pointer;
    font-family: var(--heading-font);
    text-transform: uppercase;
    font-weight: 600;
}
.crud-table button:hover, .admin-section button:hover {
    background-color: var(--primary);
}
.tabs {
    display: flex;
    margin-bottom: 20px;
    border-bottom: 1px solid #ddd;
}
.tab-link {
    padding: 12px 20px;
    cursor: pointer;
    border: 1px solid transparent;
    border-bottom: none;
    margin-right: 5px;
    font-family: var(--heading-font);
    font-weight: 600;
}
.tab-link.active {
    border-color: #ddd;
    border-bottom-color: white;
    background-color: white;
    border-radius: 5px 5px 0 0;
    color: var(--primary);
}
.tab-content { display: none; }
.tab-content.active { display: block; }

/* Media Queries */
@media (max-width: 768px) {
  .menu-toggle {
    display: block;
  }
  
  .nav-close-btn {
    display: block !important;
    width: 100%;
    text-align: right;
    position: absolute;
    top: 5px;
    right: 10px;
    z-index: 1100;
  }
  .close-menu-btn {
    background: none;
    border: none;
    font-size: 2rem;
    color: var(--primary);
    cursor: pointer;
    padding: 0 10px;
    margin-bottom: 10px;
  }
  .nav-menu {
    position: fixed;
    top: 0;
    right: -100%; /* Start off-screen */
    width: 280px; /* Wider for better touch targets */
    height: 100vh;
    background-color: var(--white);
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transition: right 0.35s ease-in-out; /* Smoother transition */
    z-index: 1000;
    box-shadow: -3px 0 10px rgba(0,0,0,0.15);
    padding-top: 10px;
  }
  
  .nav-menu.active {
    right: 0;
  }
  
  .nav-menu li {
    margin: 10px 0;
  }
  .nav-menu a {
    padding: 15px 20px;
    display: block; /* Make whole area clickable */
  }
  
  .row {
    flex-direction: column;
  }
  
  .col {
    width: 100%;
    margin-bottom: 30px;
  }
  
  .hero {
    min-height: 300px;
  }
  
  .hero h1 {
    font-size: 2rem;
  }
  .hero p {
    font-size: 1.1rem;
  }
  .section-title {
    font-size: 1.8rem;
  }
  .top-bar .container {
      flex-direction: column;
      align-items: flex-start;
  }
  .top-bar span {
      margin-left: 0 !important;
      margin-top: 5px;
  }
} 