/* 
 * Base Styles - Rosewood Ridge Site
 * Web 3.0 Design System
 */

@import url('variables.css');

/* Reset and Base Styles */
body, html {
  font-family: 'Roboto', 'Segoe UI Emoji', 'Apple Color Emoji', 'Noto Color Emoji', sans-serif !important;
  margin: 0;
  padding: 0;
  scroll-behavior: smooth;
  box-sizing: border-box;
}

*, *::before, *::after {
  box-sizing: inherit;
}

body {
  background-color: var(--bg-color);
  color: var(--text-color);
  font-size: 19px;
  line-height: 1.5;
  background: url(https://rosewoodridge.xyz/assets/background.jpg) center center/cover no-repeat fixed;
}

/* After background image, add a dark overlay */
body::before {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(10, 10, 10, 0.85); /* Darker overlay */
  z-index: -1;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  color: var(--text-color);
  margin-top: 0;
}

h1 {
  font-size: 2.5rem;
  margin-bottom: 1rem;
}

h2 {
  font-size: 2rem;
  margin-bottom: 0.75rem;
}

h3 {
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
}

p {
  font-size: 1.1rem;
  line-height: 1.6;
  margin-bottom: 1rem;
}

/* Links */
a {
  text-decoration: none;
  color: var(--highlight-color);
  transition: color 0.2s ease-in-out;
}

a:hover {
  color: var(--bright-accent);
}

a:visited {
  color: var(--visited-link-color);
}

/* Container layouts */
.container {
  background-color: var(--container-bg);
  padding: 2rem;
  margin: 2rem auto;
  max-width: 1200px;
  border-radius: var(--border-radius-std);
  box-shadow: var(--box-shadow-std);
  border: 1px solid var(--accent-color);
}

.container h1 {
  text-align: center;
  margin-bottom: 1.5rem;
}

.container h1::after {
  content: "";
  display: block;
  width: 60%;
  margin: 0.5rem auto;
  border-bottom: 2px solid var(--highlight-color);
}

/* Header */
header {
  box-shadow: var(--box-shadow-std);
  position: fixed !important;
  top: 0 !important;
  width: 100% !important;
  z-index: 1000 !important;
  background: var(--dark-accent) !important;
}

.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center; /* Vertically center items */
  height: var(--header-height);
  padding: 0 1rem;
  background-color: var(--dark-accent);
}

.nav-logo {
  height: 40px;
  width: auto;
  margin-right: 0.5rem;
  /* top: 20px !important; Removed - let flexbox handle alignment */
  vertical-align: middle; /* Helps sometimes with inline elements */
}

.site-title {
  color: var(--text-color);
  font-weight: 700;
  font-size: 1.5rem;
  /* margin-bottom: 20px !important; Removed - interferes with centering */
  display: inline-block; /* Ensure it behaves well in flex */
  vertical-align: middle; /* Align with logo */
  margin-left: 0.5rem; /* Add some space between logo and title */
}

/* Style for the anchor wrapping the logo and title */
.nav-brand-link {
  display: flex; /* Use flex to keep logo and title aligned */
  align-items: center;
  text-decoration: none; /* Remove underline */
}

/* Ensure the site title within the link retains its original color and no underline */
.nav-brand-link .site-title {
  color: var(--text-color); /* Keep original text color */
  text-decoration: none; /* Ensure no underline */
}

/* Override visited styles specifically for the site title link */
.nav-brand-link:visited .site-title {
  color: var(--text-color); /* Keep original text color even when visited */
}

/* Optional: Slight dimming on hover for the brand link, but keep title color */
.nav-brand-link:hover {
  opacity: 0.9;
}
.nav-brand-link:hover .site-title {
  color: var(--text-color); /* Keep original text color on hover */
}


.nav-right {
  display: flex;
  align-items: center;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-right li {
  position: relative;
  margin-left: 1rem;
}

.nav-right li a {
  font-weight: 500;
  display: inline-block;
  padding: 0.5rem 0.75rem;
  transition: color 0.2s;
  text-decoration: none;
  color: var(--text-color);
}

.nav-right li a:hover,
.nav-right a.active {
  color: var(--highlight-color);
}

/* Dropdown navigation */
.dropdown-content {
  visibility: hidden;
  opacity: 0;
  position: absolute;
  background-color: var(--dark-accent);
  min-width: 160px;
  box-shadow: var(--box-shadow-std);
  border-radius: 4px;
  margin-top: 0.5rem;
  transition: opacity 0.2s ease-in-out, visibility 0.2s ease-in-out;
  font-size: 14px;
  z-index: 999;
}

.nav-right li .dropdown-content a {
  display: block;
  padding: 0.5rem 1rem;
  text-decoration: none;
  color: var(--text-color);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.nav-right li .dropdown-content a:hover {
  background-color: var(--bg-color-lighter);
}

.nav-right li:hover .dropdown-content,
.dropdown-content:hover {
  opacity: 1;
  visibility: visible;
}

/* Hero sections */
.hero {
  min-height: 100vh; 
  display: flex;
  align-items: center; /* Reverted back to center */
  justify-content: center;
  overflow: hidden;
  position: relative; 
  width: 100%; 
}

/* Dark overlay */
.hero::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(10, 10, 10, 0.75); /* Adjusted opacity from 0.7 to 0.75 */
  z-index: 1; /* Above video, below content */
}

/* Define fade-in animation */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* Video wrapper */
.hero-video-wrapper {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  z-index: 0; /* Behind overlay and content */
}

.hero-video-wrapper video { 
  position: absolute;
  top: 0; /* Align top */
  left: 0; /* Align left */
  width: 100%;
  height: 100%;
  object-fit: cover; 
  /* transform: translate(-50%, -50%); */ /* Removed transform */
  pointer-events: none; 
  opacity: 0; /* Start hidden for animation */
  animation: fadeIn 1.5s ease-in forwards; /* Apply fade-in animation */
  animation-delay: 0.2s; /* Optional slight delay */
}


.hero-content {
  position: relative; 
  z-index: 2; 
  padding: 2rem;
  border-radius: var(--border-radius-lg); 
  max-width: 800px;
  text-align: center;
}

.hero-content h1 {
  color: var(--text-color);
  font-size: 3rem;
  margin-bottom: 1rem;
}

.hero-content p {
  font-size: 1.2rem;
}

/* Main content area */
main {
  padding-top: var(--header-height); /* Restored */
  padding-bottom: 2rem;
}

/* Form elements */
input[type="text"],
input[type="password"],
input[type="number"],
input[type="email"],
input[type="date"],
select,
textarea {
  padding: 0.7rem 0.8rem;
  border: var(--input-border);
  border-radius: var(--border-radius-std);
  background-color: var(--input-bg);
  color: var(--text-color);
  transition: border-color 0.3s, box-shadow 0.3s;
  font-size: 0.95rem;
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.4);
}

input[type="text"]:focus,
input[type="password"]:focus,
input[type="number"]:focus,
input[type="email"]:focus,
input[type="date"]:focus,
select:focus,
textarea:focus {
  outline: 0;
  border: var(--input-focus-border);
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.4), var(--box-shadow-glow);
}

input[type="date"] {
  color-scheme: dark;
}

input[readonly] {
  background-color: rgba(40, 40, 40, 0.7);
  cursor: not-allowed;
}

textarea {
  min-height: 100px;
  resize: vertical;
}

select option {
  background-color: #2a2a2a;
  color: var(--text-color);
}

/* Buttons */
button, 
.button {
  display: inline-block;
  padding: 0.6rem 1rem;
  background-color: var(--accent-color);
  color: var(--text-color);
  border: none;
  border-radius: var(--border-radius-std);
  font-weight: 600;
  cursor: pointer;
  text-align: center;
  transition: background 0.3s, transform 0.2s, box-shadow 0.3s;
}

button:hover,
.button:hover {
  background-color: var(--highlight-color);
  transform: translateY(-2px);
  box-shadow: var(--box-shadow-std);
}

button:active,
.button:active {
  transform: scale(0.98);
  box-shadow: var(--box-shadow-light);
}

.button-success {
  background-color: var(--success-color);
}

.button-success:hover {
  background-color: #218838;
}

.button-error {
  background-color: var(--error-color);
}

.button-error:hover {
  background-color: #c82333;
}

/* Tables */
table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 1rem;
}

th {
  background: var(--gradient-accent);
  text-align: left;
  padding: 0.75rem;
  font-weight: 600;
  color: var(--text-color);
  border-bottom: 1px solid var(--accent-color);
}

td {
  padding: 0.6rem 0.75rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  vertical-align: middle;
}

tbody tr:nth-child(2n) {
  background-color: rgba(255, 255, 255, 0.05);
}

tbody tr:hover {
  background-color: rgba(125, 56, 45, 0.1);
}

/* Utility Classes */
.hidden {
  display: none !important;
}

.text-center {
  text-align: center;
}

.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }

/* Footer */
footer {
  background-color: var(--dark-accent);
  color: var(--text-color);
  padding: 1rem;
  text-align: center;
}

/* Responsive design */
@media (max-width: 768px) {
  header .site-title {
    display: none;
  }
  
  header .nav-right {
    display: none;
    position: absolute;
    top: var(--header-height);
    right: 0;
    background-color: var(--dark-accent);
    width: 100%;
    padding: 0;
    margin: 0;
    flex-direction: column;
  }
  
  header .nav-right li {
    width: 100%;
    text-align: center;
    margin: 0;
  }
  
  header .navbar {
    position: relative;
  }
  
  header .navbar::after {
    content: "\2630";
    font-size: 2rem;
    cursor: pointer;
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-color);
  }
  
  header .navbar:hover .nav-right,
  header .navbar:focus-within .nav-right {
    display: flex;
  }

  .container {
    padding: 1.5rem 1rem;
    margin: 1rem;
  }
  
  .hero-content h1 {
    font-size: 2rem;
  }

  .hero-content p {
    font-size: 1rem;
  }
}

/* ==============================
   Footer SEO & Links
   ============================== */
.footer-seo {
  padding-top: 1rem;
  margin-bottom: 0.5rem;
}

.footer-seo p {
  font-size: 0.85rem;
  color: var(--text-secondary-color);
  opacity: 0.8;
  margin-bottom: 0.5rem;
}

.footer-seo nav {
  margin-top: 0.5rem;
}

.footer-seo nav a {
  color: var(--highlight-color);
  text-decoration: none;
  font-size: 0.85rem;
}

.footer-seo nav a:hover {
  text-decoration: underline;
}

/* Global Breadcrumb (non-rules pages) */
.breadcrumb {
  padding: 0.75rem 0;
  margin-bottom: 1rem;
  font-size: 0.9rem;
  color: var(--text-secondary-color);
}

.breadcrumb a {
  color: var(--highlight-color);
  text-decoration: none;
}

.breadcrumb a:hover {
  text-decoration: underline;
}