/* Modern Domoticz Landing Page Styles */

/* CSS Variables for theming */
:root {
    --primary: #00d4aa;
    --primary-dark: #00b894;
    --secondary: #6c5ce7;
    --accent: #fd79a8;
    --dark: #0a0a1a;
    --dark-lighter: #12122a;
    --dark-card: #1a1a2e;
    --text-primary: #ffffff;
    --text-secondary: #a0a0b0;
    --gradient-primary: linear-gradient(135deg, #00d4aa 0%, #00b894 50%, #6c5ce7 100%);
    --gradient-dark: linear-gradient(180deg, #0a0a1a 0%, #12122a 100%);
    --gradient-card: linear-gradient(145deg, rgba(26, 26, 46, 0.9), rgba(22, 22, 42, 0.95));
    --shadow-glow: 0 0 40px rgba(0, 212, 170, 0.3);
    --shadow-card: 0 8px 32px rgba(0, 0, 0, 0.3);
    --border-radius: 16px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Reset & Base */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--dark);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    overflow-x: hidden;
}

/* Animated background */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background:
        radial-gradient(ellipse at 20% 20%, rgba(0, 212, 170, 0.15) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 80%, rgba(108, 92, 231, 0.15) 0%, transparent 50%),
        radial-gradient(ellipse at 50% 50%, rgba(253, 121, 168, 0.05) 0%, transparent 60%);
    pointer-events: none;
    z-index: 0;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: -0.02em;
}

a {
    color: var(--primary);
    text-decoration: none;
    transition: var(--transition);
}

a:hover {
    color: var(--secondary);
}

/* Layout */
.main {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
    position: relative;
    z-index: 1;
}

.wrapper {
    width: 100%;
}

/* Navigation */
header {
    position: relative;
    z-index: 100;
}

.menu-row {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(10, 10, 26, 0.8);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    transition: var(--transition);
}

.menu-row .main {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 24px;
}

.menu-row nav {
    width: 100%;
}

.menu {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    list-style: none;
    padding: 16px 0;
}

.menu li a {
    display: inline-block;
    padding: 10px 20px;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-radius: 8px;
    transition: var(--transition);
    position: relative;
}

.menu li a::before {
    content: '';
    position: absolute;
    bottom: 6px;
    left: 50%;
    transform: translateX(-50%) scaleX(0);
    width: 20px;
    height: 2px;
    background: var(--gradient-primary);
    border-radius: 2px;
    transition: var(--transition);
}

.menu li a:hover,
.menu li a.active {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.05);
}

.menu li a.active::before,
.menu li a:hover::before {
    transform: translateX(-50%) scaleX(1);
}

/* Hero Section */
.row-bot {
    padding-top: 80px;
    background: transparent;
}

.row-bot-bg {
    width: 100%;
    padding: 20px 0 40px;
}

.row-bot-bg > .main > .wrapper.p6 {
    text-align: center;
    margin-bottom: 30px;
}

h1 {
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
}

h1 .logo-img {
    width: 80px;
    height: auto;
    filter: drop-shadow(0 0 20px rgba(0, 212, 170, 0.5));
}

h1 a {
    display: inline-block;
    font-size: 72px;
    font-weight: 800;
    color: #ffffff;
    text-indent: 0;
    filter: drop-shadow(0 0 20px rgba(0, 212, 170, 0.5));
    cursor: default;
}

h1 a:hover {
    color: #ffffff;
}

h2 {
    font-size: 28px;
    font-weight: 400;
    color: var(--text-secondary);
    background: none;
    padding: 0;
    margin: 0;
}

/* Slider */
.slider-wrapper {
    max-width: 1000px;
    margin: 0 auto 30px;
    border-radius: var(--border-radius);
    overflow: hidden;
    background: var(--gradient-card);
    padding: 8px;
    box-shadow: var(--shadow-card);
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: var(--transition);
    position: relative;
}

.slider-wrapper::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--gradient-primary);
    opacity: 0;
    transition: var(--transition);
}

.slider-wrapper:hover {
    border-color: rgba(0, 212, 170, 0.3);
    box-shadow: var(--shadow-glow);
}

.slider-wrapper:hover::before {
    opacity: 1;
}

.slider {
    width: 100%;
    border-radius: 12px;
    overflow: hidden;
    position: relative;
}

.slider .items {
    display: block;
    position: relative;
    width: 100%;
}

.slider .items li {
    list-style: none;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    opacity: 0;
    transform: scale(1.05);
    transition: opacity 0.8s ease-in-out, transform 0.8s ease-in-out;
}

.slider .items li:first-child {
    position: relative;
}

.slider .items li.active {
    opacity: 1;
    transform: scale(1);
    z-index: 1;
}

.slider .items img {
    width: 100%;
    height: auto;
    display: block;
}

/* Hero text section */
.row-bot-bg .wrapper:last-child {
    display: flex;
    align-items: center;
    gap: 40px;
    max-width: 1000px;
    margin: 0 auto;
    background: var(--gradient-card);
    border-radius: var(--border-radius);
    padding: 40px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: var(--shadow-card);
    margin-bottom: 0;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.row-bot-bg .wrapper:last-child:hover {
    border-color: rgba(0, 212, 170, 0.3);
    box-shadow: var(--shadow-glow);
}

.img-indent2 {
    flex-shrink: 0;
    margin: 0;
    float: none;
}

.img-indent2 img {
    width: 120px;
    height: auto;
    filter: drop-shadow(0 0 20px rgba(0, 212, 170, 0.4));
    animation: float 4s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.extra-wrap {
    flex: 1;
}

.text-1 {
    font-size: 18px;
    line-height: 1.8;
    color: var(--text-secondary);
    background: none;
    padding: 0;
}

.text-1 .link-1 {
    color: var(--primary);
    font-weight: 600;
    position: relative;
}

.text-1 .link-1::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--primary);
    transform: scaleX(0);
    transform-origin: right;
    transition: transform 0.3s ease;
}

.text-1 .link-1:hover::after {
    transform: scaleX(1);
    transform-origin: left;
}

/* Features Section */
.container_12 {
    padding: 20px 0 30px;
}

.container_12 > .wrapper {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.grid_4 {
    background: var(--gradient-card);
    border-radius: var(--border-radius);
    padding: 40px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: var(--shadow-card);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.grid_4::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--gradient-primary);
    opacity: 0;
    transition: var(--transition);
}

.grid_4:hover {
    transform: translateY(-5px);
    border-color: rgba(0, 212, 170, 0.3);
    box-shadow: var(--shadow-glow);
}

.grid_4:hover::before {
    opacity: 1;
}

.indent-left,
.indent-left2 {
    padding: 0;
}

h3 {
    font-size: 24px;
    margin-bottom: 16px;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

h6 {
    font-size: 14px;
    font-weight: 600;
    color: var(--secondary);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 20px;
}

.grid_4 p,
.img-indent-bot {
    color: var(--text-secondary);
    font-size: 15px;
    line-height: 1.7;
    margin-bottom: 0;
}

/* List styling */
.list-1 {
    list-style: none;
    padding: 0;
}

.list-1 li {
    padding: 12px 0;
    padding-left: 28px;
    position: relative;
    color: var(--text-secondary);
    font-size: 15px;
    line-height: 1.6;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    background: none;
}

.list-1 li:last-child {
    border-bottom: none;
}

.list-1 li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 8px;
    height: 8px;
    background: var(--primary);
    border-radius: 50%;
    box-shadow: 0 0 10px var(--primary);
}

.list-1 li a {
    color: var(--primary);
}

.list-1 li a:hover {
    color: var(--secondary);
}

/* Donation button styling */
.grid_4 form {
    margin-top: 20px;
    display: flex;
    justify-content: center;
}

.grid_4 form input[type="image"] {
    filter: brightness(1.1);
    transition: var(--transition);
    border-radius: 8px;
}

.grid_4 form input[type="image"]:hover {
    transform: scale(1.05);
    filter: brightness(1.2);
}

/* Footer */
footer {
    background: rgba(10, 10, 26, 0.95);
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    padding: 30px 0 25px;
    position: relative;
    z-index: 1;
}

footer .main {
    text-align: center;
}

footer .aligncenter {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

footer .aligncenter br {
    display: none;
}

footer .p0 {
    color: var(--text-secondary);
    font-size: 14px;
    margin: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
}

footer .p0 strong {
    color: var(--text-primary);
    display: block;
    margin-bottom: 10px;
    font-size: 15px;
}

footer .p0 a {
    transition: var(--transition);
    display: inline-block;
}

footer .p0 a:hover img {
    transform: scale(1.05);
}

footer .p0 img {
    transition: var(--transition);
    max-width: 200px;
    height: auto;
    display: block;
    margin: 0 auto;
}

footer span {
    color: var(--text-secondary);
    font-size: 13px;
    padding-top: 12px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    width: 100%;
    max-width: 400px;
}

/* Responsive Design */
@media (max-width: 1024px) {
    h1 a {
        font-size: 56px;
    }

    h2 {
        font-size: 22px;
    }

    .container_12 > .wrapper {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    }
}

@media (max-width: 768px) {
    .menu-row .main {
        flex-direction: column;
    }

    .menu {
        flex-wrap: wrap;
        justify-content: center;
        gap: 4px;
        padding: 12px 0;
    }

    .menu li a {
        padding: 8px 14px;
        font-size: 12px;
    }

    h1 a {
        font-size: 42px;
    }

    h2 {
        font-size: 18px;
    }

    .row-bot {
        padding-top: 120px;
    }

    .row-bot-bg .wrapper:last-child {
        flex-direction: column;
        text-align: center;
        padding: 30px;
    }

    .text-1 {
        font-size: 16px;
    }

    .grid_4 {
        padding: 30px;
    }

    h3 {
        font-size: 20px;
    }
}

@media (max-width: 480px) {
    h1 a {
        font-size: 32px;
    }

    h2 {
        font-size: 16px;
    }

    .slider-wrapper {
        margin: 0 -12px 40px;
        border-radius: 0;
    }

    .container_12 > .wrapper {
        gap: 20px;
    }

    .grid_4 {
        padding: 24px;
    }
}

/* Utility classes */
.p0, .p1, .p2, .p3, .p4, .p5, .p6 {
    margin-bottom: 0;
}

.prev-indent-bot {
    margin-bottom: 10px;
}

/* Scrollbar styling */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--dark);
}

::-webkit-scrollbar-thumb {
    background: var(--dark-card);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary);
}

/* Selection styling */
::selection {
    background: var(--primary);
    color: var(--dark);
}

/* Smooth page load animation */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.grid_4 {
    animation: fadeIn 0.6s ease-out forwards;
}

.grid_4:nth-child(1) { animation-delay: 0.1s; }
.grid_4:nth-child(2) { animation-delay: 0.2s; }
.grid_4:nth-child(3) { animation-delay: 0.3s; }
