/* ==========================================================================
   MARCOTSA - MÁRMOLES COTO, S.L.
   Pure Static HTML5 & CSS3 Implementation
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Fonts
   -------------------------------------------------------------------------- */
@font-face {
  font-family: 'IstokWeb';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('../fonts/IstokWeb-latin_latin-ext-regular.woff2') format('woff2');
}

@font-face {
  font-family: 'IstokWeb';
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url('../fonts/IstokWeb-latin_latin-ext-italic.woff2') format('woff2');
}

@font-face {
  font-family: 'IstokWeb';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('../fonts/IstokWeb-latin_latin-ext-700.woff2') format('woff2');
}

@font-face {
  font-family: 'IstokWeb';
  font-style: italic;
  font-weight: 700;
  font-display: swap;
  src: url('../fonts/IstokWeb-latin_latin-ext-700italic.woff2') format('woff2');
}

@font-face {
  font-family: 'Lora';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('../fonts/Lora-latin_latin-ext-regular.woff2') format('woff2');
}

@font-face {
  font-family: 'Lora';
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url('../fonts/Lora-latin_latin-ext-italic.woff2') format('woff2');
}

@font-face {
  font-family: 'Lora';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('../fonts/Lora-latin_latin-ext-700.woff2') format('woff2');
}

@font-face {
  font-family: 'Lora';
  font-style: italic;
  font-weight: 700;
  font-display: swap;
  src: url('../fonts/Lora-latin_latin-ext-700italic.woff2') format('woff2');
}

/* --------------------------------------------------------------------------
   2. Design Tokens & Variables
   -------------------------------------------------------------------------- */
:root {
  --color-bg: #fafafa;
  --color-text: #444444;
  --color-heading: #444444;
  --color-accent-teal: #00667b;
  --color-accent-teal-dark: #004d5c;
  --color-accent-teal-soft: rgba(0, 102, 123, 0.08);
  --color-accent-light: #e2e2e2;
  --color-border: #e8e8e8;
  --color-white: #ffffff;
  --color-dark: #32373c;
  --color-error: #cf2e2e;
  --color-success: #198754;

  --font-heading: 'IstokWeb', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --font-body: 'Lora', Georgia, 'Times New Roman', serif;

  --max-width-content: 960px;
  --max-width-wide: 1140px;

  --transition-fast: 0.2s ease;
  --transition-normal: 0.3s ease;
  --shadow-subtle: 0 4px 15px rgba(0, 0, 0, 0.05);
  --shadow-medium: 0 6px 20px rgba(0, 0, 0, 0.08);
  --shadow-elevated: 0 12px 30px rgba(0, 0, 0, 0.12);
  --border-radius-sm: 4px;
  --border-radius-md: 8px;
  --border-radius-pill: 9999px;
}

/* --------------------------------------------------------------------------
   3. Global Reset & Base
   -------------------------------------------------------------------------- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  background-color: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.7;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

main {
  flex: 1 0 auto;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--color-text);
  text-decoration: none;
  transition: color var(--transition-fast), background-color var(--transition-fast);
}

a:hover {
  color: var(--color-accent-teal);
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  color: var(--color-heading);
  font-weight: 700;
  line-height: 1.25;
  margin-bottom: 1rem;
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2.06rem; }
h3 { font-size: 1.75rem; }
h4 { font-size: 1.44rem; }
h5 { font-size: 1.19rem; font-weight: 600; }
h6 { font-size: 1rem; font-weight: 600; }

p {
  margin-bottom: 1.25rem;
}

p:last-child {
  margin-bottom: 0;
}

.container {
  width: 100%;
  max-width: var(--max-width-content);
  margin-left: auto;
  margin-right: auto;
  padding-left: 20px;
  padding-right: 20px;
}

.container-wide {
  width: 100%;
  max-width: var(--max-width-wide);
  margin-left: auto;
  margin-right: auto;
  padding-left: 20px;
  padding-right: 20px;
}

/* --------------------------------------------------------------------------
   4. Header & Navigation
   -------------------------------------------------------------------------- */
.site-header {
  background-color: var(--color-bg);
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.03);
}

.header-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 18px;
  padding-bottom: 18px;
}

.site-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

.site-logo-text {
  font-family: var(--font-heading);
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--color-heading);
  margin: 0;
  line-height: 1;
}

.site-nav {
  display: flex;
  align-items: center;
}

.nav-list {
  display: flex;
  align-items: center;
  list-style: none;
  gap: 6px;
}

.nav-item a {
  display: inline-block;
  font-family: var(--font-body);
  font-size: 0.95rem;
  color: var(--color-text);
  padding: 8px 16px;
  border-radius: var(--border-radius-pill);
  transition: all var(--transition-fast);
  white-space: nowrap;
}

.nav-item a:hover {
  background-color: var(--color-accent-teal-soft);
  color: var(--color-accent-teal);
}

.nav-item.active a {
  color: var(--color-accent-teal);
  font-weight: 700;
  background-color: var(--color-accent-teal-soft);
}

/* Hamburger toggle for mobile */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  width: 42px;
  height: 42px;
  position: relative;
  z-index: 1100;
}

.nav-toggle-icon,
.nav-toggle-icon::before,
.nav-toggle-icon::after {
  display: block;
  width: 26px;
  height: 2px;
  background-color: var(--color-text);
  transition: transform 0.3s ease, background-color 0.3s ease;
  position: relative;
}

.nav-toggle-icon::before,
.nav-toggle-icon::after {
  content: '';
  position: absolute;
  left: 0;
}

.nav-toggle-icon::before {
  top: -8px;
}

.nav-toggle-icon::after {
  top: 8px;
}

.nav-toggle.open .nav-toggle-icon {
  background-color: transparent;
}

.nav-toggle.open .nav-toggle-icon::before {
  transform: translateY(8px) rotate(45deg);
}

.nav-toggle.open .nav-toggle-icon::after {
  transform: translateY(-8px) rotate(-45deg);
}

/* --------------------------------------------------------------------------
   5. Hero Section
   -------------------------------------------------------------------------- */
.hero-section {
  position: relative;
  min-height: 420px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  background-color: #444444;
  background-image: linear-gradient(rgba(68, 68, 68, 0.65), rgba(68, 68, 68, 0.65)), url('../images/hero-bg.jpg');
  background-size: cover;
  background-position: 54% 79%;
  background-repeat: no-repeat;
  color: var(--color-white);
  padding: 80px 20px;
}

.hero-content {
  max-width: 800px;
  margin: 0 auto;
}

.hero-title {
  font-family: var(--font-heading);
  font-size: 2.85rem;
  font-weight: 700;
  letter-spacing: 1px;
  color: #ffffff;
  margin-bottom: 0;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.4);
}

/* --------------------------------------------------------------------------
   6. Sections
   -------------------------------------------------------------------------- */
.section {
  padding-top: 60px;
  padding-bottom: 60px;
}

.section-intro {
  background-color: var(--color-bg);
}

.section-title {
  font-size: 2.06rem;
  text-align: center;
  color: var(--color-heading);
  margin-bottom: 1.5rem;
}

.section-subtitle {
  font-size: 1.18rem;
  font-weight: 600;
  text-align: center;
  color: var(--color-heading);
  margin-bottom: 1.5rem;
}

.intro-text-block {
  max-width: 840px;
  margin: 0 auto 48px;
  text-align: center;
}

.intro-text-block p {
  font-size: 1.05rem;
  line-height: 1.8;
  margin-bottom: 1rem;
}

/* Media Cards Grid */
.media-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 32px;
  align-items: center;
  margin-top: 36px;
}

.media-card {
  background-color: var(--color-white);
  border-radius: var(--border-radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-subtle);
  transition: transform var(--transition-normal), box-shadow var(--transition-normal);
  display: block;
}

.media-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-medium);
}

.media-card img {
  width: 100%;
  height: auto;
  object-fit: cover;
  display: block;
}

.media-card-bordered {
  border: 1px solid var(--color-border);
}

/* Parallax Sustainability Section */
.section-sustainability {
  position: relative;
  background-color: var(--color-bg);
  background-image: linear-gradient(rgba(250, 250, 250, 0.78), rgba(250, 250, 250, 0.78)), url('../images/sostenibilidad-bg.jpg');
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
  background-attachment: fixed;
  padding: 85px 20px;
}

.sustainability-content {
  max-width: 860px;
  margin: 0 auto;
  text-align: center;
}

.sustainability-content p {
  font-size: 1.05rem;
  line-height: 1.85;
  color: var(--color-text);
}

/* --------------------------------------------------------------------------
   7. Page Banner & Interior Layouts
   -------------------------------------------------------------------------- */
.page-header {
  background-color: #ededed;
  border-bottom: 1px solid var(--color-border);
  padding: 40px 20px;
  text-align: center;
}

.page-header h1 {
  margin: 0;
  font-size: 2.25rem;
  color: var(--color-heading);
}

.content-two-columns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: start;
}

.content-image-column img {
  border-radius: var(--border-radius-md);
  box-shadow: var(--shadow-medium);
  width: 100%;
}

.content-text-column {
  font-size: 1.05rem;
  line-height: 1.8;
}

.content-text-column p {
  margin-bottom: 1.25rem;
}

.legal-section {
  margin-bottom: 24px;
}

.legal-section strong {
  display: block;
  font-family: var(--font-heading);
  font-size: 1.1rem;
  color: var(--color-heading);
  margin-bottom: 4px;
}

/* Buttons */
.btn {
  display: inline-block;
  font-family: var(--font-heading);
  font-size: 0.95rem;
  font-weight: 600;
  padding: 10px 24px;
  border-radius: var(--border-radius-md);
  cursor: pointer;
  border: 1px solid transparent;
  transition: all var(--transition-fast);
  text-align: center;
  text-decoration: none;
}

.btn-primary {
  background-color: var(--color-dark);
  color: var(--color-white);
}

.btn-primary:hover {
  background-color: var(--color-accent-teal);
  color: var(--color-white);
  box-shadow: var(--shadow-subtle);
}

.btn-outline {
  background-color: transparent;
  color: var(--color-text);
  border-color: var(--color-text);
}

.btn-outline:hover {
  background-color: var(--color-accent-teal);
  border-color: var(--color-accent-teal);
  color: var(--color-white);
}

/* --------------------------------------------------------------------------
   8. Contact Form
   -------------------------------------------------------------------------- */
.contact-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 48px;
  align-items: start;
}

.contact-card {
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--border-radius-md);
  padding: 32px;
  box-shadow: var(--shadow-subtle);
}

.contact-info-box {
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--border-radius-md);
  padding: 32px;
  box-shadow: var(--shadow-subtle);
}

.contact-logo-wrap {
  margin-bottom: 24px;
}

.contact-logo-wrap img {
  max-width: 260px;
  height: auto;
}

.contact-info-list {
  list-style: none;
  margin-top: 20px;
}

.contact-info-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 18px;
  font-size: 1rem;
}

.contact-info-icon {
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  color: var(--color-accent-teal);
  margin-top: 2px;
}

.contact-info-item a {
  color: var(--color-accent-teal);
  font-weight: 600;
}

.contact-info-item a:hover {
  text-decoration: underline;
}

.form-group {
  margin-bottom: 20px;
}

.form-label {
  display: block;
  font-family: var(--font-heading);
  font-size: 0.95rem;
  font-weight: 600;
  margin-bottom: 6px;
  color: var(--color-heading);
}

.form-label span.required {
  color: var(--color-error);
}

.form-input,
.form-textarea {
  width: 100%;
  font-family: var(--font-body);
  font-size: 1rem;
  padding: 10px 14px;
  border: 1px solid #ccc;
  border-radius: var(--border-radius-sm);
  background-color: var(--color-white);
  color: var(--color-text);
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.form-input:focus,
.form-textarea:focus {
  outline: none;
  border-color: var(--color-accent-teal);
  box-shadow: 0 0 0 3px rgba(0, 102, 123, 0.15);
}

.form-textarea {
  min-height: 140px;
  resize: vertical;
}

.form-checkbox-group {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-top: 14px;
  margin-bottom: 16px;
}

.form-checkbox-group input[type="checkbox"] {
  margin-top: 4px;
  width: 18px;
  height: 18px;
  accent-color: var(--color-accent-teal);
  cursor: pointer;
  flex-shrink: 0;
}

.form-checkbox-label {
  font-size: 0.88rem;
  line-height: 1.5;
  color: #555;
  cursor: pointer;
}

.form-help-text {
  font-size: 0.85rem;
  color: #777;
  margin-bottom: 20px;
}

.form-feedback {
  padding: 12px 16px;
  border-radius: var(--border-radius-sm);
  margin-top: 16px;
  display: none;
  font-size: 0.95rem;
}

.form-feedback.success {
  display: block;
  background-color: #d1e7dd;
  color: #0f5132;
  border: 1px solid #badbcc;
}

.form-feedback.error {
  display: block;
  background-color: #f8d7da;
  color: #842029;
  border: 1px solid #f5c2c7;
}

/* --------------------------------------------------------------------------
   9. Footer
   -------------------------------------------------------------------------- */
.site-footer {
  background-color: var(--color-bg);
  border-top: 1px solid rgba(0, 0, 0, 0.08);
  padding: 50px 20px 30px;
  text-align: center;
}

.footer-logo {
  margin-bottom: 24px;
}

.footer-logo a {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--color-heading);
}

.footer-nav {
  margin-bottom: 24px;
}

.footer-nav-list {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  list-style: none;
  gap: 16px;
}

.footer-nav-item a {
  font-size: 0.95rem;
  color: var(--color-text);
  padding: 4px 8px;
  transition: color var(--transition-fast);
}

.footer-nav-item a:hover {
  color: var(--color-accent-teal);
}

.footer-nav-item.active a {
  color: var(--color-accent-teal);
  font-weight: 700;
}

.footer-copyright {
  font-size: 0.88rem;
  color: #777;
  margin-top: 18px;
}

/* --------------------------------------------------------------------------
   10. Cookie Notice Banner
   -------------------------------------------------------------------------- */
.cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background-color: rgba(50, 55, 60, 0.96);
  color: #ffffff;
  padding: 16px 24px;
  z-index: 9999;
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.15);
  display: none;
  backdrop-filter: blur(4px);
}

.cookie-banner.show {
  display: block;
}

.cookie-container {
  max-width: var(--max-width-wide);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}

.cookie-text {
  font-size: 0.9rem;
  line-height: 1.5;
  flex: 1 1 500px;
}

.cookie-text a {
  color: #8ed1fc;
  text-decoration: underline;
}

.cookie-actions {
  display: flex;
  gap: 12px;
  flex-shrink: 0;
}

.cookie-btn {
  padding: 8px 18px;
  font-size: 0.88rem;
  font-family: var(--font-heading);
  font-weight: 600;
  border-radius: var(--border-radius-pill);
  cursor: pointer;
  border: none;
  transition: all var(--transition-fast);
}

.cookie-btn-accept {
  background-color: var(--color-accent-teal);
  color: #ffffff;
}

.cookie-btn-accept:hover {
  background-color: #008fa8;
}

.cookie-btn-reject {
  background-color: #555555;
  color: #ffffff;
}

.cookie-btn-reject:hover {
  background-color: #666666;
}

/* --------------------------------------------------------------------------
   11. Responsive Media Queries
   -------------------------------------------------------------------------- */
@media (max-width: 900px) {
  .content-two-columns,
  .contact-grid {
    grid-template-columns: 1fr;
    gap: 36px;
  }
}

@media (max-width: 768px) {
  .nav-toggle {
    display: block;
  }

  .site-nav {
    position: fixed;
    top: 65px;
    left: 0;
    right: 0;
    background-color: var(--color-bg);
    border-bottom: 2px solid var(--color-border);
    padding: 20px 24px;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.08);
    display: none;
    flex-direction: column;
    align-items: stretch;
  }

  .site-nav.open {
    display: flex;
  }

  .nav-list {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
  }

  .nav-item a {
    display: block;
    padding: 10px 16px;
    text-align: center;
  }

  .hero-title {
    font-size: 2.1rem;
  }

  .hero-section {
    min-height: 340px;
    padding: 60px 20px;
  }

  .section {
    padding-top: 45px;
    padding-bottom: 45px;
  }

  .section-sustainability {
    background-attachment: scroll; /* iOS parallax fix */
    padding: 60px 20px;
  }

  .footer-nav-list {
    flex-direction: column;
    gap: 10px;
  }
}
