/**
 * DigitalStackHub Theme - Main Stylesheet
 * 
 * @package DigitalStackHub
 * @version 1.0.0
 */

/* ============================================================
   CSS VARIABLES (Root)
   ============================================================ */

:root {
    --dsh-primary: #1a73e8;
    --dsh-primary-dark: #0d5bbf;
    --dsh-primary-light: #4a8ef0;
    --dsh-secondary: #6c757d;
    --dsh-success: #28a745;
    --dsh-danger: #dc3545;
    --dsh-warning: #ffc107;
    --dsh-info: #17a2b8;
    --dsh-dark: #1a1a2e;
    --dsh-light: #f8f9fa;
    --dsh-gray: #6c757d;
    --dsh-gray-light: #e9ecef;
    --dsh-gray-dark: #495057;
    
    --dsh-border-radius: 8px;
    --dsh-border-radius-lg: 12px;
    --dsh-border-radius-sm: 4px;
    
    --dsh-box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    --dsh-box-shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.1);
    
    --dsh-transition: all 0.3s ease;
}

/* ============================================================
   CSS RESET & NORMALIZATION
   ============================================================ */

*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    font-size: 1rem;
    line-height: 1.6;
    color: #1a1a2e;
    background-color: #fff;
    overflow-x: hidden;
}

/* ============================================================
   TYPOGRAPHY
   ============================================================ */

h1, h2, h3, h4, h5, h6 {
    font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-weight: 600;
    line-height: 1.3;
    margin-bottom: 1rem;
    color: #1a1a2e;
}

h1 {
    font-size: 3rem;
    font-weight: 700;
}

h2 {
    font-size: 2.25rem;
    font-weight: 600;
}

h3 {
    font-size: 1.5rem;
    font-weight: 600;
}

h4 {
    font-size: 1.25rem;
    font-weight: 500;
}

h5 {
    font-size: 1.125rem;
    font-weight: 500;
}

h6 {
    font-size: 1rem;
    font-weight: 500;
}

p {
    margin-bottom: 1rem;
}

a {
    color: var(--dsh-primary, #1a73e8);
    text-decoration: none;
    transition: color 0.2s ease;
}

a:hover {
    color: var(--dsh-primary-dark, #0d5bbf);
}

/* ============================================================
   CONTAINER & LAYOUT
   ============================================================ */

.container {
    max-width: 1200px;
    width: 100%;
    margin: 0 auto;
    padding: 0 20px;
}

.site-main {
    padding: 60px 0;
}

.site-main-full-width {
    padding: 0;
}

/* ============================================================
   BUTTONS
   ============================================================ */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    font-size: 1rem;
    font-weight: 500;
    line-height: 1;
    text-align: center;
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.3s ease;
    cursor: pointer;
    border: 2px solid transparent;
}

.btn-small,
.btn-sm {
    padding: 8px 16px;
    font-size: 0.875rem;
}

.btn-large,
.btn-lg {
    padding: 16px 32px;
    font-size: 1.125rem;
}

.btn-block {
    display: flex;
    width: 100%;
}

.btn-primary {
    background-color: var(--dsh-primary, #1a73e8);
    border-color: var(--dsh-primary, #1a73e8);
    color: #fff;
}

.btn-primary:hover,
.btn-primary:focus {
    background-color: var(--dsh-primary-dark, #0d5bbf);
    border-color: var(--dsh-primary-dark, #0d5bbf);
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(26, 115, 232, 0.3);
}

.btn-secondary {
    background-color: #6c757d;
    border-color: #6c757d;
    color: #fff;
}

.btn-secondary:hover {
    background-color: #5a6268;
    border-color: #5a6268;
    color: #fff;
}

.btn-outline {
    background-color: transparent;
    border-color: var(--dsh-primary, #1a73e8);
    color: var(--dsh-primary, #1a73e8);
}

.btn-outline:hover {
    background-color: var(--dsh-primary, #1a73e8);
    color: #fff;
    transform: translateY(-2px);
}

.btn-danger {
    background-color: #dc3545;
    border-color: #dc3545;
    color: #fff;
}

.btn-danger:hover {
    background-color: #c82333;
    border-color: #bd2130;
}

.btn-success {
    background-color: #28a745;
    border-color: #28a745;
    color: #fff;
}

.btn-warning {
    background-color: #ffc107;
    border-color: #ffc107;
    color: #1a1a2e;
}

.btn-link {
    background: none;
    border: none;
    color: var(--dsh-primary, #1a73e8);
    padding: 0;
}

.btn-link:hover {
    background: none;
    text-decoration: underline;
    transform: none;
    box-shadow: none;
}

.btn:disabled,
.btn.disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* ============================================================
   FORMS
   ============================================================ */

.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: #1a1a2e;
}

.required-star {
    color: #dc3545;
    margin-left: 4px;
}

.form-control {
    display: block;
    width: 100%;
    padding: 12px 16px;
    font-size: 1rem;
    line-height: 1.5;
    color: #495057;
    background-color: #fff;
    border: 1px solid #ced4da;
    border-radius: 8px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.form-control:focus {
    border-color: var(--dsh-primary, #1a73e8);
    outline: 0;
    box-shadow: 0 0 0 3px rgba(26, 115, 232, 0.1);
}

.form-control::placeholder {
    color: #adb5bd;
}

.form-help {
    display: block;
    margin-top: 0.5rem;
    font-size: 0.75rem;
    color: #6c757d;
}

.form-error {
    margin-top: 0.5rem;
    font-size: 0.75rem;
    color: #dc3545;
}

.form-group.has-error .form-control {
    border-color: #dc3545;
}

.form-group.has-error .form-error {
    display: block;
}

/* Checkbox & Radio */
.checkbox-label,
.radio-label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-weight: normal;
}

.checkbox-text,
.radio-text {
    user-select: none;
}

/* Input Groups */
.input-wrapper {
    position: relative;
}

.input-wrapper i {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: #adb5bd;
}

.input-wrapper .form-control {
    padding-left: 42px;
}

.password-wrapper {
    position: relative;
}

.toggle-password {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #6c757d;
    cursor: pointer;
    padding: 4px;
}

/* ============================================================
   CARDS
   ============================================================ */

.card {
    background: #fff;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
}

.card-image {
    position: relative;
    overflow: hidden;
}

.card-image img {
    width: 100%;
    height: auto;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.card:hover .card-image img {
    transform: scale(1.05);
}

.card-content {
    padding: 20px;
}

.card-title {
    margin-bottom: 12px;
    font-size: 1.25rem;
    font-weight: 600;
}

.card-title a {
    color: #1a1a2e;
}

.card-title a:hover {
    color: var(--dsh-primary, #1a73e8);
}

.card-excerpt {
    color: #6c757d;
    margin-bottom: 16px;
    font-size: 0.875rem;
}

.card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid #e9ecef;
}

.card-meta {
    font-size: 0.75rem;
    color: #adb5bd;
}

/* ============================================================
   ALERTS
   ============================================================ */

.alert {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 16px 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    position: relative;
}

.alert-success {
    background-color: #d4edda;
    border-left: 4px solid #28a745;
    color: #155724;
}

.alert-error,
.alert-danger {
    background-color: #f8d7da;
    border-left: 4px solid #dc3545;
    color: #721c24;
}

.alert-warning {
    background-color: #fff3cd;
    border-left: 4px solid #ffc107;
    color: #856404;
}

.alert-info {
    background-color: #d1ecf1;
    border-left: 4px solid #17a2b8;
    color: #0c5460;
}

.alert-icon i {
    font-size: 1.25rem;
}

.alert-content {
    flex: 1;
}

.alert-title {
    margin-bottom: 4px;
    font-size: 1rem;
    font-weight: 600;
}

.alert-message {
    font-size: 0.875rem;
}

.alert-dismiss {
    background: none;
    border: none;
    font-size: 1.125rem;
    cursor: pointer;
    color: inherit;
    opacity: 0.7;
    padding: 4px;
}

.alert-dismiss:hover {
    opacity: 1;
}

/* ============================================================
   PAGINATION
   ============================================================ */

.pagination {
    display: inline-flex;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 5px;
    flex-wrap: wrap;
    justify-content: center;
}

.page-item {
    margin: 0;
}

.page-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 10px;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    color: #495057;
    text-decoration: none;
    transition: all 0.2s ease;
    background: #fff;
}

.page-link:hover {
    background: var(--dsh-primary, #1a73e8);
    border-color: var(--dsh-primary, #1a73e8);
    color: #fff;
}

.page-item.active .page-link {
    background: var(--dsh-primary, #1a73e8);
    border-color: var(--dsh-primary, #1a73e8);
    color: #fff;
    cursor: default;
}

.page-item.disabled .page-link {
    color: #adb5bd;
    cursor: not-allowed;
    background: #f8f9fa;
}

/* ============================================================
   BREADCRUMBS
   ============================================================ */

.breadcrumbs {
    padding: 15px 0;
    margin-bottom: 20px;
    font-size: 0.875rem;
    color: #6c757d;
}

.breadcrumbs a {
    color: #6c757d;
    text-decoration: none;
}

.breadcrumbs a:hover {
    color: var(--dsh-primary, #1a73e8);
}

.breadcrumbs .separator {
    margin: 0 8px;
}

/* ============================================================
   UTILITY CLASSES
   ============================================================ */

.text-center {
    text-align: center;
}

.text-left {
    text-align: left;
}

.text-right {
    text-align: right;
}

.text-primary {
    color: var(--dsh-primary, #1a73e8);
}

.text-success {
    color: #28a745;
}

.text-warning {
    color: #ffc107;
}

.text-danger {
    color: #dc3545;
}

.text-muted {
    color: #6c757d;
}

.bg-light {
    background-color: #f8f9fa;
}

.bg-dark {
    background-color: #1a1a2e;
    color: #fff;
}

.mt-0 { margin-top: 0; }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }
.mt-5 { margin-top: 2.5rem; }

.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }
.mb-5 { margin-bottom: 2.5rem; }

.pt-0 { padding-top: 0; }
.pt-1 { padding-top: 0.5rem; }
.pt-2 { padding-top: 1rem; }
.pt-3 { padding-top: 1.5rem; }
.pt-4 { padding-top: 2rem; }
.pt-5 { padding-top: 2.5rem; }

.pb-0 { padding-bottom: 0; }
.pb-1 { padding-bottom: 0.5rem; }
.pb-2 { padding-bottom: 1rem; }
.pb-3 { padding-bottom: 1.5rem; }
.pb-4 { padding-bottom: 2rem; }
.pb-5 { padding-bottom: 2.5rem; }

.screen-reader-text {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* ============================================================
   LOADING SPINNER
   ============================================================ */

.loading-spinner {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 20px;
    justify-content: center;
}

.spinner {
    width: 24px;
    height: 24px;
    border: 3px solid #e9ecef;
    border-top-color: var(--dsh-primary, #1a73e8);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* ============================================================
   RESPONSIVE UTILITIES
   ============================================================ */

.hide-mobile {
    display: block;
}

.show-mobile {
    display: none;
}

/* ============================================================
   MOBILE MENU TOGGLE
   ============================================================ */

.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 10px;
    font-size: 16px;
    font-weight: 500;
    color: #333;
    align-items: center;
    gap: 8px;
}

.hamburger {
    display: inline-flex;
    flex-direction: column;
    justify-content: space-between;
    width: 22px;
    height: 18px;
}

.hamburger-line {
    width: 100%;
    height: 2px;
    background-color: currentColor;
    border-radius: 2px;
    transition: all 0.3s ease;
}

.mobile-menu-toggle[aria-expanded="true"] .hamburger-line:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.mobile-menu-toggle[aria-expanded="true"] .hamburger-line:nth-child(2) {
    opacity: 0;
}

.mobile-menu-toggle[aria-expanded="true"] .hamburger-line:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

/* Show mobile menu toggle on tablet/mobile */
@media (max-width: 991px) {
    .mobile-menu-toggle {
        display: flex;
    }
}

/* ============================================================
   RESPONSIVE MEDIA QUERIES
   ============================================================ */

@media (max-width: 768px) {
    .hide-mobile {
        display: none;
    }
    
    .show-mobile {
        display: block;
    }
    
    h1 {
        font-size: 2rem;
    }
    
    h2 {
        font-size: 1.75rem;
    }
    
    h3 {
        font-size: 1.25rem;
    }
    
    .container {
        padding: 0 16px;
    }
    
    .site-main {
        padding: 40px 0;
    }
}
/* ============================================================
   FRONT PAGE SPECIFIC STYLES
   ============================================================ */

/* Hero Section */
.hero-section {
    padding: 80px 0;
    background: linear-gradient(135deg, #f8f9fa 0%, #fff 100%);
}

.hero-content {
    display: flex;
    align-items: center;
    gap: 60px;
}

.hero-text {
    flex: 1;
}

.hero-title {
    font-size: 3.5rem;
    margin-bottom: 20px;
    line-height: 1.2;
}

.hero-description {
    font-size: 1.125rem;
    color: #6c757d;
    margin-bottom: 30px;
}

.hero-buttons {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.hero-image {
    flex: 1;
    text-align: center;
}

.hero-image img {
    max-width: 100%;
    height: auto;
}

/* Features Section */
.features-section {
    padding: 80px 0;
    background: #fff;
}

.section-header {
    text-align: center;
    margin-bottom: 50px;
}

.section-title {
    font-size: 2.5rem;
    margin-bottom: 15px;
}

.section-description {
    font-size: 1.125rem;
    color: #6c757d;
    max-width: 600px;
    margin: 0 auto;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
}

.feature-card {
    text-align: center;
    padding: 30px 20px;
    background: #fff;
    border-radius: 16px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
}

.feature-icon {
    width: 70px;
    height: 70px;
    background: rgba(26, 115, 232, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
}

.feature-icon i {
    font-size: 2rem;
    color: var(--dsh-primary, #1a73e8);
}

.feature-title {
    font-size: 1.25rem;
    margin-bottom: 15px;
}

.feature-description {
    color: #6c757d;
    margin: 0;
}

/* Pricing Preview Section */
.pricing-preview-section {
    padding: 80px 0;
    background: #f8f9fa;
}

.pricing-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
    margin-bottom: 40px;
}

.pricing-cta {
    text-align: center;
}

/* Latest Resources Section */
.latest-resources-section {
    padding: 80px 0;
    background: #fff;
}

.resources-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    margin-bottom: 40px;
}

/* Testimonials Section */
.testimonials-section {
    padding: 80px 0;
    background: #f8f9fa;
}

.testimonials-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.testimonial-card {
    background: #fff;
    border-radius: 16px;
    padding: 30px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}

.testimonial-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
}

.testimonial-content {
    margin-bottom: 20px;
}

.testimonial-content i {
    font-size: 2rem;
    color: var(--dsh-primary, #1a73e8);
    opacity: 0.5;
    margin-bottom: 15px;
    display: block;
}

.testimonial-content p {
    font-style: italic;
    color: #495057;
    margin: 0;
}

.testimonial-author {
    display: flex;
    align-items: center;
    gap: 15px;
}

.author-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    object-fit: cover;
}

.author-name {
    margin: 0 0 5px;
    font-size: 1rem;
}

.author-role {
    margin: 0;
    font-size: 0.75rem;
    color: #6c757d;
}

/* CTA Section */
.cta-section {
    padding: 80px 0;
    background: linear-gradient(135deg, var(--dsh-primary, #1a73e8) 0%, var(--dsh-primary-dark, #0d5bbf) 100%);
    text-align: center;
}

.cta-title {
    color: #fff;
    font-size: 2.5rem;
    margin-bottom: 15px;
}

.cta-description {
    color: rgba(255, 255, 255, 0.9);
    font-size: 1.125rem;
    margin-bottom: 30px;
}

.cta-section .btn-primary {
    background: #fff;
    color: var(--dsh-primary, #1a73e8);
    border-color: #fff;
}

.cta-section .btn-primary:hover {
    background: transparent;
    color: #fff;
    border-color: #fff;
}

/* Demo Notice */
.demo-notice {
    margin-top: 20px;
    padding: 12px 16px;
    background: #fff3cd;
    border-left: 4px solid #ffc107;
    border-radius: 8px;
    color: #856404;
    font-size: 0.875rem;
}

.demo-notice i {
    margin-right: 8px;
}