/* Ubatuba Portal - Unified Design System */

:root {
  --ocean: #0077B6;
  --ocean-light: #48CAE4;
  --ocean-deep: #023E8A;
  --teal: #00897B;
  --teal-light: #4DB6AC;
  --sand: #FFF8F0;
  --sand-warm: #F5E6D3;
  --white: #FFFFFF;
  --off-white: #FAFBFC;
  --text: #1A2A3A;
  --text-mid: #4A6070;
  --text-light: #7A96A8;
  --border: #E2ECF2;
  --shadow-sm: 0 2px 8px rgba(0,40,80,0.06);
  --shadow-md: 0 8px 30px rgba(0,40,80,0.1);
  --radius: 16px;
  --radius-sm: 10px;
  --transition: all 0.3s ease;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  color: var(--text);
  background-color: var(--sand);
  line-height: 1.6;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 0.5em;
  letter-spacing: -0.5px;
}

h1 { font-size: 3rem; }
h2 { font-size: 2.2rem; }
h3 { font-size: 1.6rem; }
h4 { font-size: 1.3rem; }
h5 { font-size: 1.1rem; }
h6 { font-size: 1rem; }

p {
  margin-bottom: 1.2em;
}

a {
  color: var(--ocean);
  text-decoration: none;
  transition: var(--transition);
}

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

/* Navigation */
nav {
  background: rgba(2,62,138,0.95);
  backdrop-filter: blur(12px);
  box-shadow: 0 4px 20px rgba(0,0,0,0.15);
  position: sticky;
  top: 0;
  z-index: 100;
  padding: 0 40px;
}

nav .container {
  max-width: 1200px;
  margin: 0 auto;
}

nav ul {
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  padding: 0;
  margin: 0;
}

nav li {
  margin: 0;
}

nav a {
  display: block;
  padding: 16px 20px;
  color: rgba(255,255,255,0.85);
  font-weight: 500;
  font-size: 14px;
  border-bottom: 3px solid transparent;
  transition: var(--transition);
}

nav a:hover,
nav a.active {
  color: #fff;
  border-bottom-color: var(--ocean-light);
}

.nav-brand {
  font-size: 20px;
  font-weight: 800;
  color: #fff;
  letter-spacing: 1px;
  margin-right: auto;
  padding: 12px 0;
}

.nav-brand a {
  color: #fff;
  text-decoration: none;
}

/* Header */
header {
  background: linear-gradient(135deg, #023E8A 0%, #0077B6 30%, #00897B 60%, #48CAE4 100%);
  color: white;
  padding: 3rem 2rem;
  text-align: center;
}

header h1 {
  color: white;
  margin-bottom: 0.5rem;
}

header .subtitle {
  font-size: 1.2rem;
  opacity: 0.9;
}

/* Hero Section */
.hero {
  background: linear-gradient(135deg, #023E8A 0%, #0077B6 30%, #00897B 60%, #48CAE4 100%);
  background-size: cover;
  background-position: center;
  color: white;
  padding: 6rem 2rem;
  text-align: center;
  min-height: 500px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  animation: fadeIn 0.8s ease-in;
}

.hero h1 {
  color: white;
  font-size: clamp(2.5rem, 5vw, 3.5rem);
  margin-bottom: 1rem;
  letter-spacing: -1.5px;
}

.hero p {
  font-size: 1.3rem;
  margin-bottom: 2rem;
  opacity: 0.9;
  font-weight: 300;
}

.hero-image-placeholder {
  width: 100%;
  height: 300px;
  border-radius: var(--radius);
  margin: 2rem 0;
}

/* Search Bar */
.search-container {
  margin-top: 2rem;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.search-bar {
  display: flex;
  gap: 0.5rem;
}

.search-bar input {
  flex: 1;
  padding: 1rem;
  border: none;
  border-radius: 60px;
  font-size: 1rem;
  font-family: 'Segoe UI', system-ui, sans-serif;
}

.search-bar button {
  padding: 1rem 2rem;
  background: linear-gradient(135deg, var(--teal), var(--ocean));
  color: white;
  border: none;
  border-radius: 60px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
}

.search-bar button:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(0,119,182,0.3);
}

/* Weather Strip */
.weather-strip {
  background-color: var(--white);
  padding: 1.5rem 2rem;
  margin: 2rem 0;
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
}

.weather-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 1.5rem;
  text-align: center;
}

.weather-item {
  padding: 1rem;
}

.weather-item .label {
  font-size: 0.9rem;
  color: var(--text-light);
  margin-bottom: 0.5rem;
}

.weather-item .value {
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--ocean);
}

/* Container */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
}

/* Section Styling */
section {
  padding: 4rem 2rem;
}

.section-title {
  text-align: center;
  margin-bottom: 3rem;
  color: var(--ocean-deep);
  border-bottom: 3px solid var(--ocean-light);
  display: inline-block;
  padding-bottom: 0.5rem;
}

/* Grid Layouts */
.grid-2 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 24px;
  margin-bottom: 2rem;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 24px;
  margin-bottom: 2rem;
}

.grid-4 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 24px;
  margin-bottom: 2rem;
}

/* Cards */
.card {
  background: var(--white);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
  transition: var(--transition);
  animation: slideUp 0.5s ease-out;
}

.card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-md);
  border-color: var(--ocean-light);
}

.card-image {
  width: 100%;
  height: 200px;
  background: linear-gradient(135deg, var(--ocean) 0%, var(--teal) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: bold;
  font-size: 1.1rem;
}

.card-content {
  padding: 1.5rem;
}

.card-title {
  font-size: 1.3rem;
  color: var(--ocean-deep);
  margin-bottom: 0.5rem;
}

.card-subtitle {
  color: var(--text-light);
  font-size: 0.95rem;
  margin-bottom: 1rem;
}

.card-text {
  color: var(--text-mid);
  line-height: 1.6;
  margin-bottom: 1rem;
}

.card-meta {
  display: flex;
  gap: 1rem;
  font-size: 0.9rem;
  color: var(--text-light);
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}

.card-link {
  display: inline-block;
  margin-top: 1rem;
  padding: 0.7rem 1.5rem;
  background: linear-gradient(135deg, var(--ocean), var(--ocean-deep));
  color: white;
  border-radius: 60px;
  font-weight: 600;
  transition: var(--transition);
}

.card-link:hover {
  color: white;
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(0,119,182,0.3);
}

/* Beach Card */
.beach-card {
  display: flex;
  flex-direction: column;
}

.beach-card-image {
  width: 100%;
  height: 250px;
  background: linear-gradient(135deg, #023E8A 0%, #0077B6 100%);
  border-radius: var(--radius) var(--radius) 0 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.beach-card .card-content {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.beach-card .card-link {
  margin-top: auto;
}

/* Newsletter */
.newsletter {
  background: linear-gradient(135deg, #023E8A 0%, #0077B6 30%, #00897B 60%, #48CAE4 100%);
  color: white;
  padding: 3rem 2rem;
  border-radius: var(--radius);
  text-align: center;
  margin: 2rem 0;
}

.newsletter h3 {
  color: white;
  margin-bottom: 1rem;
}

.newsletter-form {
  display: flex;
  gap: 0.5rem;
  margin-top: 1.5rem;
  max-width: 500px;
  margin-left: auto;
  margin-right: auto;
}

.newsletter-form input {
  flex: 1;
  padding: 1rem;
  border: none;
  border-radius: 60px;
  font-size: 1rem;
}

.newsletter-form button {
  padding: 1rem 2rem;
  background: linear-gradient(135deg, var(--teal), var(--ocean));
  color: white;
  border: none;
  border-radius: 60px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
}

.newsletter-form button:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(0,119,182,0.3);
}

/* Footer */
footer {
  background-color: var(--ocean-deep);
  color: rgba(255,255,255,0.7);
  padding: 40px 2rem;
  text-align: center;
}

footer .footer-brand {
  font-size: 20px;
  font-weight: 800;
  color: #fff;
  letter-spacing: 1px;
  margin-bottom: 8px;
}

footer p {
  font-size: 13px;
  line-height: 1.6;
}

footer a {
  color: var(--ocean-light);
  text-decoration: none;
}

footer a:hover {
  text-decoration: underline;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 2rem;
  margin-bottom: 2rem;
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
  text-align: left;
}

.footer-section h4 {
  color: var(--ocean-light);
  margin-bottom: 1rem;
}

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

.footer-section li {
  margin-bottom: 0.7rem;
}

.footer-section a {
  color: rgba(255,255,255,0.6);
}

.footer-section a:hover {
  color: var(--ocean-light);
}

.footer-bottom {
  text-align: center;
  padding-top: 2rem;
  border-top: 1px solid rgba(255,255,255,0.1);
  color: rgba(255,255,255,0.5);
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
}

/* Beach Article Page */
.beach-hero {
  height: 400px;
  background: linear-gradient(135deg, #023E8A 0%, #0077B6 50%, #00897B 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  text-align: center;
  padding: 2rem;
  margin-bottom: 3rem;
}

.beach-hero h1 {
  color: white;
  font-size: clamp(2rem, 4vw, 3rem);
  margin-bottom: 0.5rem;
}

.beach-hero .region {
  font-size: 1.2rem;
  opacity: 0.85;
  font-weight: 300;
}

.beach-content {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 3rem;
  margin-bottom: 3rem;
}

.beach-article {
  font-size: 1.05rem;
  line-height: 1.8;
}

.beach-article p {
  margin-bottom: 1.5rem;
}

.beach-sidebar {
  background: var(--white);
  padding: 2rem;
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
  height: fit-content;
  position: sticky;
  top: 80px;
}

.info-box {
  margin-bottom: 2rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--border);
}

.info-box:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

.info-label {
  font-size: 1.1rem;
  color: var(--ocean-deep);
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.info-value {
  color: var(--text-mid);
  font-size: 0.95rem;
  line-height: 1.6;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 2rem;
  padding: 10px 20px;
  background: linear-gradient(135deg, var(--ocean), var(--ocean-deep));
  color: white;
  border-radius: 60px;
  font-weight: 600;
  font-size: 14px;
  transition: var(--transition);
}

.back-link:hover {
  color: white;
  transform: translateX(-4px);
  box-shadow: 0 4px 16px rgba(0,119,182,0.3);
}

/* Nearby Spots Section */
.nearby-section {
  margin-top: 3rem;
  padding-top: 3rem;
  border-top: 2px solid var(--border);
}

.nearby-section h2 {
  color: var(--ocean-deep);
  margin-bottom: 2rem;
}

/* Beach Index */
.beach-regions {
  max-width: 1200px;
  margin: 0 auto;
}

.region-section {
  margin-bottom: 4rem;
}

.region-title {
  font-size: 2rem;
  color: var(--ocean-deep);
  margin-bottom: 2rem;
  padding-bottom: 1rem;
  border-bottom: 3px solid var(--ocean-light);
}

/* Restaurant/Hotel Listings */
.listing-item {
  background: var(--white);
  padding: 2rem;
  border-radius: var(--radius);
  margin-bottom: 1.5rem;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
  border-left: 4px solid var(--ocean);
  transition: var(--transition);
}

.listing-item:hover {
  box-shadow: var(--shadow-md);
  transform: translateX(5px);
}

.listing-title {
  font-size: 1.4rem;
  color: var(--ocean-deep);
  margin-bottom: 0.5rem;
}

.listing-meta {
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
  margin: 1rem 0;
  font-size: 0.95rem;
}

.listing-meta-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--text-mid);
}

.meta-label {
  font-weight: 600;
  color: var(--ocean);
}

.listing-description {
  color: var(--text-mid);
  line-height: 1.7;
  margin-top: 1rem;
}

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

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

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

.fade-in {
  opacity: 0;
  animation: fadeIn 0.6s ease-out forwards;
}

/* Responsive */
@media (max-width: 768px) {
  h1 { font-size: 2rem; }
  h2 { font-size: 1.6rem; }
  h3 { font-size: 1.4rem; }

  nav {
    padding: 0 20px;
  }

  nav ul {
    display: none;
  }

  .nav-brand {
    margin-right: 0;
  }

  .hero {
    padding: 3rem 1.5rem;
    min-height: 350px;
  }

  .hero h1 {
    font-size: 2rem;
  }

  .beach-content {
    grid-template-columns: 1fr;
  }

  .beach-sidebar {
    position: static;
  }

  .beach-hero {
    height: 250px;
  }

  .beach-hero h1 {
    font-size: 1.8rem;
  }

  .grid-2,
  .grid-3,
  .grid-4 {
    grid-template-columns: 1fr;
  }

  .search-bar,
  .newsletter-form {
    flex-direction: column;
  }

  .search-bar input,
  .search-bar button,
  .newsletter-form input,
  .newsletter-form button {
    border-radius: var(--radius-sm);
  }

  .footer-grid {
    grid-template-columns: 1fr;
  }

  footer {
    padding: 32px 20px;
  }
}

@media (max-width: 480px) {
  h1 { font-size: 1.5rem; }
  h2 { font-size: 1.2rem; }

  .hero h1 {
    font-size: 1.5rem;
  }

  section {
    padding: 2rem 1rem;
  }

  .card-image {
    height: 150px;
  }

  .weather-grid {
    grid-template-columns: 1fr;
  }
}

/* Screen reader only (accessibility) */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}

/* Touch targets - minimum 44px for accessibility */
.back-link {
  padding: 14px 24px;
  min-height: 44px;
}

.card-link {
  min-height: 48px;
  display: inline-flex;
  align-items: center;
}

/* Minimum font sizes for mobile readability */
@media (max-width: 768px) {
  body {
    font-size: 15px;
  }

  .info-label {
    font-size: 14px;
  }

  .info-value {
    font-size: 14px;
  }

  .card-subtitle {
    font-size: 14px;
  }

  .card-text {
    font-size: 14px;
  }
}

@media (max-width: 480px) {
  body {
    font-size: 14px;
  }
}
