/* Base Styles */
:root {
  /* Color Variables */
  --primary-color: #2C3E50;
  --secondary-color: #E74C3C;
  --light-color: #ECF0F1;
  --dark-text: #333333;
  --white-text: #FFFFFF;
  
  /* Transition Variables */
  --transition-speed: 0.3s;
}

/* Dark Mode Colors */
.dark-mode {
  --primary-color: #1a2530;
  --secondary-color: #c0392b;
  --light-color: #2c3e50;
  --dark-text: #ecf0f1;
  --white-text: #FFFFFF;
}

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

body {
  font-family: 'Open Sans', sans-serif;
  color: var(--dark-text);
  background-color: #FFFFFF;
  line-height: 1.6;
  transition: background-color var(--transition-speed) ease;
}

body.dark-mode {
  background-color: #121212;
}

.container {
  width: 90%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'Montserrat', sans-serif;
  font-weight: 700;
  margin-bottom: 1rem;
}

a {
  text-decoration: none;
  color: var(--primary-color);
  transition: color var(--transition-speed) ease;
}

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

button {
  cursor: pointer;
  font-family: 'Roboto Condensed', sans-serif;
}

img {
  max-width: 100%;
  height: auto;
}

/* Header Section */
.header {
  height: 100vh;
  background: linear-gradient(rgba(44, 62, 80, 0.5), rgba(44, 62, 80, 0.6)), url('../images/hero-architecture-modern.svg');
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.header::before {
  content: '';
  position: absolute;
  bottom: -10px;
  left: 0;
  width: 100%;
  height: 100px;
  background: url('../images/wave-overlay.svg');
  background-size: cover;
  background-position: bottom;
  animation: waveAnimation 15s linear infinite;
  opacity: 0.7;
}

@keyframes waveAnimation {
  0% { background-position: 0 bottom; }
  100% { background-position: 100vw bottom; }
}

.header-content {
  text-align: center;
  color: var(--white-text);
}

.header-content h1 {
  font-size: 4rem;
  margin-bottom: 2rem;
  animation: fadeIn 1.5s;
}

.header-content p.tagline {
  font-size: 1.5rem;
  margin-bottom: 3rem;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.scroll-cta {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  color: var(--white-text);
  margin-top: 2rem;
  animation: bounce 2s infinite;
  cursor: pointer;
}

.scroll-cta span {
  margin-top: 0.5rem;
}

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

@keyframes bounce {
  0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
  40% { transform: translateY(-20px); }
  60% { transform: translateY(-10px); }
}

/* Filter Navigation */
.filter-nav {
  position: sticky;
  top: 0;
  background: #FFFFFF;
  padding: 1rem 0;
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
  z-index: 100;
  transition: background-color var(--transition-speed) ease;
}

.dark-mode .filter-nav {
  background: #1a1a1a;
  box-shadow: 0 2px 10px rgba(0,0,0,0.3);
}

.filter-nav .container {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
}

button.filter-btn {
  background: none;
  border: 2px solid var(--primary-color);
  color: var(--primary-color);
  padding: 0.5rem 1.5rem;
  margin: 0.5rem;
  font-family: 'Roboto Condensed', sans-serif;
  font-weight: 700;
  transition: all var(--transition-speed) ease;
}

button.filter-btn:hover, button.filter-btn.active {
  background: var(--primary-color);
  color: var(--white-text);
}

/* Architecture Grid */
.architecture-grid {
  padding: 4rem 0;
}

.grid-container {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 2rem;
}

.site-card {
  background: #FFFFFF;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 5px 15px rgba(0,0,0,0.1);
  transition: transform var(--transition-speed) ease, box-shadow var(--transition-speed) ease;
}

.dark-mode .site-card {
  background: #1a1a1a;
  box-shadow: 0 5px 15px rgba(0,0,0,0.3);
}

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

.card-image {
  height: 200px;
  overflow: hidden;
}

.card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

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

.card-content {
  padding: 1.5rem;
}

.card-content h3 {
  margin-bottom: 0.5rem;
  font-weight: 700;
  color: var(--primary-color);
}

.dark-mode .card-content h3 {
  color: var(--light-color);
}

p.site-description {
  color: #666;
  margin-bottom: 1rem;
  font-size: 0.9rem;
}

.dark-mode p.site-description {
  color: #aaa;
}

.tags {
  display: flex;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}

span.tag {
  background: var(--light-color);
  color: var(--primary-color);
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  font-size: 0.8rem;
  margin-right: 0.5rem;
  margin-bottom: 0.5rem;
}

.dark-mode span.tag {
  background: #2c3e50;
  color: #ecf0f1;
}

a.visit-btn {
  display: inline-block;
  padding: 0.5rem 1.5rem;
  background: var(--secondary-color);
  color: var(--white-text);
  text-decoration: none;
  border-radius: 4px;
  font-weight: 600;
  transition: background var(--transition-speed) ease;
}

a.visit-btn:hover {
  background: #c0392b;
  color: var(--white-text);
}

/* Newsletter Section */
.newsletter {
  background: var(--primary-color);
  color: var(--white-text);
  padding: 4rem 0;
  text-align: center;
}

.newsletter h2 {
  margin-bottom: 1.5rem;
}

.newsletter p {
  max-width: 600px;
  margin: 0 auto 2rem;
}

form.signup-form {
  display: flex;
  max-width: 500px;
  margin: 0 auto;
}

form.signup-form input[type="email"] {
  flex: 1;
  padding: 0.75rem 1rem;
  border: none;
  border-radius: 4px 0 0 4px;
  font-size: 1rem;
}

form.signup-form button {
  background: var(--secondary-color);
  color: var(--white-text);
  border: none;
  padding: 0 1.5rem;
  border-radius: 0 4px 4px 0;
  font-weight: 600;
  cursor: pointer;
  transition: background var(--transition-speed) ease;
}

form.signup-form button:hover {
  background: #c0392b;
}

/* Footer */
footer {
  background: var(--light-color);
  padding: 3rem 0;
  transition: background-color var(--transition-speed) ease;
}

.dark-mode footer {
  background: #1a2530;
}

.footer-content {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
}

.footer-column {
  flex: 1;
  min-width: 200px;
  margin-bottom: 2rem;
}

.footer-column h4 {
  margin-bottom: 1rem;
  color: var(--primary-color);
}

.dark-mode .footer-column h4 {
  color: var(--white-text);
}

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

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

.footer-column ul li a {
  color: #666;
  text-decoration: none;
  transition: color var(--transition-speed) ease;
}

.dark-mode .footer-column ul li a {
  color: #aaa;
}

.footer-column ul li a:hover {
  color: var(--secondary-color);
}

.copyright {
  text-align: center;
  padding-top: 2rem;
  margin-top: 2rem;
  border-top: 1px solid #CCC;
  color: #666;
  font-size: 0.9rem;
}

.dark-mode .copyright {
  border-top: 1px solid #2c3e50;
  color: #aaa;
}

/* Theme Toggle Button */
.theme-toggle {
  position: fixed;
  bottom: 20px;
  right: 20px;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: var(--primary-color);
  color: var(--white-text);
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 10px rgba(0,0,0,0.2);
  z-index: 1000;
  transition: background var(--transition-speed) ease;
}

.theme-toggle:hover {
  background: #1a2530;
}

.sun-icon, .moon-icon {
  position: absolute;
  transition: opacity var(--transition-speed) ease, transform var(--transition-speed) ease;
}

.dark-mode .sun-icon {
  opacity: 1;
  transform: scale(1);
}

.dark-mode .moon-icon {
  opacity: 0;
  transform: scale(0);
}

.sun-icon {
  opacity: 0;
  transform: scale(0);
}

.moon-icon {
  opacity: 1;
  transform: scale(1);
}

/* Favorites Toggle Button */
.favorites-toggle {
  position: fixed;
  bottom: 20px;
  left: 20px;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: var(--primary-color);
  color: var(--white-text);
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 10px rgba(0,0,0,0.2);
  z-index: 1000;
  transition: background var(--transition-speed) ease;
}

.favorites-toggle:hover {
  background: #1a2530;
}

.favorites-count {
  position: absolute;
  top: 0;
  right: 0;
  background: var(--secondary-color);
  color: var(--white-text);
  width: 20px;
  height: 20px;
  border-radius: 50%;
  font-size: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Fade In Animation for Cards */
.fade-in {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Responsive Styles */
@media (max-width: 768px) {
  .header-content h1 {
    font-size: 3rem;
  }
  
  .header-content p.tagline {
    font-size: 1.2rem;
  }
  
  form.signup-form {
    flex-direction: column;
  }
  
  form.signup-form input[type="email"] {
    border-radius: 4px;
    margin-bottom: 1rem;
  }
  
  form.signup-form button {
    border-radius: 4px;
    padding: 0.75rem;
  }
  
  .footer-column {
    flex: 0 0 100%;
  }
}

@media (max-width: 480px) {
  .header-content h1 {
    font-size: 2.5rem;
  }
  
  button.filter-btn {
    font-size: 0.9rem;
    padding: 0.4rem 1rem;
  }
  
  .grid-container {
    grid-template-columns: 1fr;
  }
}
