/* NetStudyHub - Main Stylesheet */

:root {
  --primary: #1e40af;
  --secondary: #0891b2;
  --accent: #ea580c;
  --neutral-light: #f8fafc;
  --neutral-dark: #1e293b;
  --border: #e2e8f0;
  --text-muted: #64748b;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  line-height: 1.6;
  color: var(--neutral-dark);
  background-color: #ffffff;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 1rem;
}

h1 {
  font-size: 3rem;
  color: var(--primary);
}

h2 {
  font-size: 2.25rem;
  color: var(--primary);
}

h3 {
  font-size: 1.5rem;
  color: var(--neutral-dark);
}

h4 {
  font-size: 1.25rem;
}

p {
  margin-bottom: 1rem;
  color: var(--text-muted);
  font-size: 1rem;
}

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

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

button, .btn {
  padding: 0.75rem 1.5rem;
  border: none;
  border-radius: 0.5rem;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  display: inline-block;
  text-decoration: none;
}

.btn-primary {
  background-color: var(--primary);
  color: white;
}

.btn-primary:hover {
  background-color: #1e3a8a;
}

.btn-secondary {
  background-color: var(--secondary);
  color: white;
}

.btn-secondary:hover {
  background-color: #0e7490;
}

.btn-accent {
  background-color: var(--accent);
  color: white;
}

.btn-accent:hover {
  background-color: #d97706;
}

/* Header */
header {
  background-color: #ffffff;
  border-bottom: 1px solid var(--border);
  padding: 2rem;
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-content {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo-area {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.logo-svg {
  width: 50px;
  height: 50px;
}

.brand-name {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--primary);
}

/* Main Sections */
section {
  padding: 4rem 2rem;
}

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

.section-center {
  text-align: center;
}

.section-left {
  text-align: left;
}

/* Hero Section */
.hero {
  background: linear-gradient(135deg, #f8fafc 0%, #e0f2fe 100%);
  padding: 6rem 2rem;
}

.hero-content {
  max-width: 1200px;
  margin: 0 auto;
  text-align: center;
}

.hero h1 {
  margin-bottom: 1rem;
  font-size: 3.5rem;
}

.hero p {
  font-size: 1.25rem;
  margin-bottom: 2rem;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

/* Cards Grid */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  max-width: 1200px;
  margin: 0 auto;
}

.card {
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: 0.75rem;
  padding: 2rem;
  text-align: center;
  transition: all 0.3s ease;
}

.card:hover {
  border-color: var(--primary);
  box-shadow: 0 10px 30px rgba(30, 64, 175, 0.1);
}

.cards-grid .card:last-child:nth-child(3n+1) {
  grid-column: 2 / 3;
}

.card-icon {
  width: 60px;
  height: 60px;
  margin: 0 auto 1rem;
}

.card h3 {
  margin-bottom: 0.5rem;
}

.card p {
  font-size: 0.95rem;
  margin-bottom: 1.5rem;
}

/* Products Section */
.products-section {
  background-color: var(--neutral-light);
}

.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
  max-width: 1200px;
  margin: 0 auto;
}

.product-card {
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: 0.75rem;
  padding: 2rem;
  text-align: center;
  display: flex;
  flex-direction: column;
}

.product-icon {
  width: 80px;
  height: 80px;
  margin: 0 auto 1rem;
}

.product-card h3 {
  margin-bottom: 0.5rem;
  font-size: 1.25rem;
}

.product-card p {
  flex: 1;
  margin-bottom: 1.5rem;
  font-size: 0.95rem;
}

.product-card .btn {
  align-self: center;
}

/* Testimonials Section */
.testimonials-section {
  background-color: #ffffff;
}

.testimonial-card {
  background: var(--neutral-light);
  border-left: 4px solid var(--secondary);
  padding: 2rem;
  border-radius: 0.5rem;
  margin-bottom: 2rem;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.testimonial-text {
  font-style: italic;
  margin-bottom: 1rem;
  color: var(--neutral-dark);
}

.testimonial-author {
  font-weight: 600;
  color: var(--primary);
}

/* Newsletter Section */
.newsletter-section {
  background: linear-gradient(135deg, #1e40af 0%, #0891b2 100%);
  color: white;
}

.newsletter-content {
  max-width: 600px;
  margin: 0 auto;
  text-align: center;
}

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

.newsletter-content p {
  color: rgba(255, 255, 255, 0.9);
  margin-bottom: 2rem;
}

.newsletter-form {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

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

.newsletter-form button {
  background-color: var(--accent);
  padding: 0.75rem 1.5rem;
}

.newsletter-form button:hover {
  background-color: #d97706;
}

/* Contacts Section */
.contacts-section {
  background-color: var(--neutral-light);
  padding: 4rem 2rem;
}

.contacts-content {
  max-width: 1200px;
  margin: 0 auto;
}

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

.contact-block {
  text-align: center;
}

.contact-block h3 {
  margin-bottom: 1rem;
  color: var(--primary);
}

.contact-block p {
  font-size: 1.1rem;
  color: var(--neutral-dark);
}

.contact-block a {
  color: var(--primary);
  font-weight: 600;
}

/* Footer */
footer {
  background-color: var(--neutral-dark);
  color: white;
  padding: 3rem 2rem;
}

.footer-content {
  max-width: 1200px;
  margin: 0 auto;
}

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

.footer-column h4 {
  color: white;
  margin-bottom: 1rem;
}

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

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

.footer-column a {
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.95rem;
}

.footer-column a:hover {
  color: white;
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 2rem;
  text-align: center;
  color: rgba(255, 255, 255, 0.7);
}

.footer-bottom p {
  margin: 0;
  color: rgba(255, 255, 255, 0.7);
}

/* Cookie Banner */
#cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background-color: var(--neutral-dark);
  color: white;
  padding: 1.5rem 2rem;
  box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
  display: none;
  z-index: 9999;
  gap: 2rem;
  align-items: center;
  flex-wrap: wrap;
}

#cookie-banner.active {
  display: flex;
}

.cookie-text {
  flex: 1;
  font-size: 0.95rem;
  min-width: 250px;
}

.cookie-text p {
  margin: 0;
  color: rgba(255, 255, 255, 0.9);
}

.cookie-text a {
  color: var(--secondary);
  font-weight: 600;
  text-decoration: underline;
}

.cookie-text a:hover {
  color: #06b6d4;
}

.cookie-actions {
  display: flex;
  gap: 0.75rem;
  flex-shrink: 0;
}

.cookie-actions button {
  padding: 0.5rem 1rem;
  border: none;
  border-radius: 0.4rem;
  cursor: pointer;
  font-size: 0.9rem;
  font-weight: 600;
  transition: all 0.3s ease;
  white-space: nowrap;
}

#cookie-accept-all {
  background-color: var(--primary);
  color: white;
}

#cookie-accept-all:hover {
  background-color: #1e3a8a;
}

#cookie-reject-all {
  background-color: transparent;
  color: white;
  border: 1px solid rgba(255, 255, 255, 0.3);
}

#cookie-reject-all:hover {
  background-color: rgba(255, 255, 255, 0.1);
  border-color: white;
}

#cookie-customize {
  background-color: transparent;
  color: var(--secondary);
  border: 1px solid var(--secondary);
}

#cookie-customize:hover {
  background-color: rgba(8, 145, 178, 0.1);
}

/* Cookie Customize Modal */
#cookie-customize-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.5);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 10000;
}

#cookie-customize-modal.show {
  display: flex;
}

.cookie-modal-content {
  background-color: white;
  border-radius: 0.75rem;
  padding: 2rem;
  max-width: 500px;
  width: 90%;
  max-height: 80vh;
  overflow-y: auto;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

.cookie-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
}

.cookie-modal-header h2 {
  margin: 0;
  font-size: 1.5rem;
  color: var(--neutral-dark);
}

#cookie-modal-close {
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--text-muted);
  padding: 0;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
}

#cookie-modal-close:hover {
  color: var(--neutral-dark);
}

.cookie-options {
  margin-bottom: 2rem;
}

.cookie-option {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem;
  border: 1px solid var(--border);
  border-radius: 0.5rem;
  margin-bottom: 1rem;
  cursor: pointer;
  transition: all 0.3s ease;
}

.cookie-option:hover {
  background-color: var(--neutral-light);
  border-color: var(--primary);
}

.cookie-option input[type="checkbox"] {
  width: 20px;
  height: 20px;
  cursor: pointer;
  accent-color: var(--primary);
}

.cookie-option-info h4 {
  margin: 0 0 0.25rem 0;
  font-size: 1rem;
  color: var(--neutral-dark);
}

.cookie-option-info p {
  margin: 0;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.cookie-option input[type="checkbox"]:disabled {
  cursor: not-allowed;
  opacity: 0.6;
}

.cookie-option.disabled-option {
  opacity: 0.7;
  pointer-events: none;
}

.cookie-modal-footer {
  display: flex;
  gap: 1rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
}

.cookie-modal-footer button {
  flex: 1;
  padding: 0.75rem 1.5rem;
  border: none;
  border-radius: 0.5rem;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
}

#cookie-save-preferences {
  background-color: var(--primary);
  color: white;
}

#cookie-save-preferences:hover {
  background-color: #1e3a8a;
}

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

  h2 {
    font-size: 1.5rem;
  }

  .hero {
    padding: 3rem 2rem;
  }

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

  .hero p {
    font-size: 1rem;
  }

  .header-content {
    flex-direction: column;
    gap: 1rem;
  }

  .cards-grid,
  .products-grid {
    grid-template-columns: 1fr;
  }

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

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

  #cookie-banner {
    flex-direction: column;
    gap: 1rem;
    align-items: flex-start;
  }

  .cookie-actions {
    width: 100%;
    justify-content: flex-end;
  }

  .cookie-modal-content {
    width: 95%;
    padding: 1.5rem;
  }

  .newsletter-form {
    flex-direction: column;
  }
}

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

  h1 {
    font-size: 1.75rem;
  }

  h2 {
    font-size: 1.25rem;
  }

  section {
    padding: 2rem 1rem;
  }

  .card, .product-card {
    padding: 1.5rem;
  }

  .cookie-actions {
    flex-direction: column;
    gap: 0.5rem;
  }

  .cookie-actions button {
    width: 100%;
  }
}
