/* 
 * Shared CSS - Demo Portfolio Website
 * A collection of shared styles and CSS reset/normalize
 * Used across all sites to ensure consistent styling
 */

/* -----------------------------
   Design Tokens
   ----------------------------- */
:root {
    --hero-slider-height: clamp(28rem, 75vh, 46rem);
    --hero-slider-radius: 28px;
    --hero-slider-overlay: linear-gradient(120deg, rgba(8, 15, 40, 0.82) 0%, rgba(15, 23, 42, 0.42) 45%, rgba(8, 15, 40, 0.78) 100%);
    --hero-slider-shadow: 0 35px 80px rgba(15, 23, 42, 0.25);
    --slider-control-bg: rgba(255, 255, 255, 0.12);
    --slider-control-bg-hover: rgba(255, 255, 255, 0.28);
    --slider-dot-color: rgba(255, 255, 255, 0.45);
    --slider-dot-active: #ffffff;
}

@supports (backdrop-filter: blur(1rem)) {
    :root {
        --slider-control-bg: rgba(15, 23, 42, 0.35);
        --slider-control-bg-hover: rgba(15, 23, 42, 0.55);
    }
}

/* -----------------------------
   CSS Reset/Normalize
   ----------------------------- */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 100%;
    -webkit-text-size-adjust: 100%;
    -ms-text-size-adjust: 100%;
    scroll-behavior: smooth;
}

body {
    line-height: 1.5;
    font-family: Arial, Helvetica, sans-serif;
    color: #333;
    background-color: #fff;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

img, picture, video, canvas, svg {
    display: block;
    max-width: 100%;
    height: auto;
}

input, button, textarea, select {
    font: inherit;
}

h1, h2, h3, h4, h5, h6 {
    overflow-wrap: break-word;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 0.5em;
}

p, ul, ol {
    margin-bottom: 1rem;
}

ul, ol {
    padding-left: 2rem;
}

a {
    color: #0066cc;
    text-decoration: none;
}

a:hover, a:focus {
    text-decoration: underline;
    outline: none;
}

/* -----------------------------
   Shared Utility Classes
   ----------------------------- */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    border-radius: 4px;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.3s ease;
    border: none;
}

.primary-btn {
    background-color: #0066cc;
    color: white;
}

.primary-btn:hover {
    background-color: #0052a3;
    text-decoration: none;
}

.secondary-btn {
    background-color: transparent;
    color: #0066cc;
    border: 2px solid #0066cc;
}

.secondary-btn:hover {
    background-color: #f0f8ff;
    text-decoration: none;
}

/* -----------------------------
   Shared Layout & Components
   ----------------------------- */
.site-header {
    padding: 1rem 0;
    background-color: #fff;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 100;
}

.site-header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-weight: bold;
    font-size: 1.5rem;
}

.main-navigation ul {
    display: flex;
    list-style: none;
    padding: 0;
    margin: 0;
}

.main-navigation li {
    margin-left: 1.5rem;
}

.main-navigation a {
    color: #333;
    text-decoration: none;
    font-weight: 600;
}

.main-navigation a:hover {
    color: #0066cc;
}

.site-footer {
    background-color: #333;
    color: #fff;
    padding: 3rem 0;
}

.footer-info {
    display: flex;
    flex-wrap: wrap;
    gap: 2rem;
    margin-bottom: 2rem;
}

.site-footer h3 {
    color: #fff;
    margin-bottom: 1rem;
}

.site-footer a {
    color: #8dc4ff;
}

.copyright {
    margin-top: 2rem;
    font-size: 0.875rem;
    opacity: 0.7;
}

/* -----------------------------
   Responsive Utilities
   ----------------------------- */
@media (max-width: 768px) {
    /* Tablet breakpoint */
    .main-navigation ul {
        flex-direction: column;
    }
    
    .main-navigation li {
        margin: 0.5rem 0;
    }
    
    .site-header .container {
        flex-direction: column;
        padding: 1rem;
    }
    
    .logo {
        margin-bottom: 1rem;
    }
}

@media (max-width: 480px) {
    /* Mobile breakpoint */
    html {
        font-size: 90%;
    }
    
    .container {
        padding: 0 1rem;
    }
}

/* -----------------------------
   Modern Hero Slider Component
   ----------------------------- */
.hero-section {
    position: relative;
    padding: clamp(3rem, 6vw, 6rem) 0;
    background: linear-gradient(180deg, rgba(10, 17, 34, 0.04) 0%, rgba(10, 17, 34, 0) 40%), #ffffff;
}

[data-hero-slider] {
    position: relative;
    display: grid;
    overflow: hidden;
    min-height: var(--hero-slider-height);
    border-radius: var(--hero-slider-radius);
    background: #0f1729;
    box-shadow: var(--hero-slider-shadow);
    isolation: isolate;
}

[data-hero-slider] .hero-slide {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    display: grid;
    align-items: center;
    padding: clamp(2.5rem, 5vw, 5rem);
    background-size: cover;
    background-position: center;
    color: #ffffff;
    opacity: 0;
    transform: scale(1.04);
    transition: opacity 0.9s ease, transform 1.1s ease;
}

[data-hero-slider] .hero-slide::before {
    content: "";
    position: absolute;
    inset: 0;
    background: var(--hero-slider-overlay);
    z-index: 1;
}

[data-hero-slider] .hero-slide > *,
[data-hero-slider] .hero-slide .container > *,
[data-hero-slider] .hero-slide .slide-content > * {
    position: relative;
    z-index: 2;
}

[data-hero-slider] .hero-slide .slide-content {
    max-width: clamp(22rem, 45vw, 40rem);
    display: grid;
    gap: 1.5rem;
}

[data-hero-slider] .hero-slide .slide-content h1,
[data-hero-slider] .hero-slide .slide-content h2 {
    font-size: clamp(2.25rem, 4vw, 3.5rem);
    line-height: 1.1;
    color: #ffffff;
}

[data-hero-slider] .hero-slide .slide-content p {
    font-size: clamp(1rem, 2.2vw, 1.25rem);
    color: rgba(255, 255, 255, 0.85);
}

[data-hero-slider] .hero-slide.is-active {
    opacity: 1;
    transform: scale(1);
    z-index: 2;
}

[data-hero-slider] .hero-slide.is-active::after {
    opacity: 1;
}

[data-hero-slider] .slide-meta {
    font-size: 0.95rem;
    letter-spacing: 0.24em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.65);
}

[data-hero-slider] .slider-controls {
    position: absolute;
    inset: auto clamp(1.5rem, 4vw, 2.75rem) clamp(1.5rem, 4vw, 2.75rem);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: clamp(1rem, 3vw, 3rem);
    width: calc(100% - clamp(3rem, 8vw, 6rem));
    pointer-events: none;
    z-index: 3;
}

[data-hero-slider] .slider-controls button {
    pointer-events: all;
    width: clamp(3rem, 4vw, 3.5rem);
    height: clamp(3rem, 4vw, 3.5rem);
    border-radius: 999px;
    display: grid;
    place-items: center;
    background: var(--slider-control-bg);
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.18);
    transition: transform 0.3s ease, background 0.3s ease;
}

[data-hero-slider] .slider-controls button:hover,
[data-hero-slider] .slider-controls button:focus-visible {
    background: var(--slider-control-bg-hover);
    transform: translateY(-2px);
}

[data-hero-slider] .slider-dots {
    pointer-events: all;
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

[data-hero-slider] .slider-dot {
    width: 12px;
    height: 12px;
    border-radius: 999px;
    background: var(--slider-dot-color);
    border: none;
    padding: 0;
    transition: all 0.35s ease;
}

[data-hero-slider] .slider-dot.is-active {
    background: var(--slider-dot-active);
    width: 34px;
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.25);
}

[data-hero-slider] .slider-dot:focus-visible {
    outline: 2px solid rgba(255, 255, 255, 0.75);
    outline-offset: 2px;
}

@media (max-width: 992px) {
    [data-hero-slider] {
        min-height: clamp(24rem, 70vh, 38rem);
        border-radius: 24px;
    }
    
    [data-hero-slider] .slider-controls {
        width: calc(100% - clamp(2.5rem, 7vw, 5rem));
    }
}

@media (max-width: 768px) {
    .hero-section {
        padding: clamp(2.5rem, 10vw, 4rem) 0;
    }
    
    [data-hero-slider] {
        min-height: clamp(22rem, 65vh, 32rem);
        border-radius: 20px;
    }
    
    [data-hero-slider] .hero-slide {
        padding: clamp(2rem, 7vw, 3rem);
    }
    
    [data-hero-slider] .slider-controls {
        inset: auto clamp(1.25rem, 6vw, 2rem) clamp(1.25rem, 6vw, 2rem);
        width: calc(100% - clamp(2rem, 10vw, 4rem));
    }
    
    [data-hero-slider] .slider-controls button {
        width: 2.75rem;
        height: 2.75rem;
    }
}

@media (max-width: 540px) {
    [data-hero-slider] {
        border-radius: 18px;
        min-height: clamp(20rem, 60vh, 30rem);
    }
    
    [data-hero-slider] .slider-controls {
        flex-direction: column;
        gap: 1rem;
    }
    
    [data-hero-slider] .slider-dots {
        gap: 0.4rem;
    }
    
    [data-hero-slider] .slider-dot {
        width: 10px;
        height: 10px;
    }
}
