/* ===== Variables ===== */
:root {
    --bg-blue: #3FB7E3;
    --paper-white: #fdfdfd;
    --paper-line: #e3e3e3;
    --text-color: #333;
    --spiral-gray: #4a4a4a;
    --accent-green: #7fd62e;
    --accent-orange: #f29f05;
    --shadow-soft: 0 10px 25px rgba(0, 0, 0, 0.2);
    --font-main: 'Cairo', sans-serif;
}

/* ===== Reset & Base ===== */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background-color: var(--bg-blue);
    font-family: var(--font-main);
    color: var(--text-color);
    direction: rtl;
    min-height: 100vh;
    padding: 2rem 0;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    overflow-x: hidden;
    background-image: radial-gradient(circle at 50% 50%, #4bc3eb 0%, #3FB7E3 100%);
    animation: backgroundPulse 10s ease-in-out infinite;
}

@keyframes backgroundPulse {

    0%,
    100% {
        background-image: radial-gradient(circle at 50% 50%, #4bc3eb 0%, #3FB7E3 100%);
    }

    50% {
        background-image: radial-gradient(circle at 50% 50%, #52c9f0 0%, #45bae8 100%);
    }
}

a {
    text-decoration: none;
    color: inherit;
}

ul {
    list-style: none;
}

/* ===== Notebook Layout ===== */
.notebook-wrapper {
    position: relative;
    width: 90%;
    max-width: 1000px;
    margin-top: 2rem;
    perspective: 1000px;
    animation: floatIn 1.5s ease-out, gentleFloat 6s ease-in-out infinite 1.5s;
}

@keyframes floatIn {
    from {
        opacity: 0;
        transform: translateY(50px) scale(0.95);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes gentleFloat {

    0%,
    100% {
        transform: translateY(0px);
    }

    50% {
        transform: translateY(-10px);
    }
}

.notebook-page {
    background-color: var(--paper-white);
    min-height: 800px;
    /* Reduced height for better look */
    width: 100%;
    margin-left: 20px;
    /* Space for spiral */
    padding: 3rem 4rem 3rem 5rem;
    box-shadow:
        10px 10px 20px rgba(0, 0, 0, 0.15),
        1px 1px 0 rgba(0, 0, 0, 0.1);
    position: relative;
    background-image: linear-gradient(var(--paper-line) 1px, transparent 1px);
    background-size: 100% 2rem;
    /* Line height */
    border-radius: 5px 15px 15px 5px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.notebook-page:hover {
    transform: translateY(-5px);
    box-shadow:
        15px 15px 30px rgba(0, 0, 0, 0.2),
        1px 1px 0 rgba(0, 0, 0, 0.1);
}

/* Spiral Binding Effect */
.notebook-page::before {
    content: '';
    position: absolute;
    top: 10px;
    bottom: 10px;
    left: -25px;
    width: 40px;
    background:
        radial-gradient(circle at 10px 10px, #333 4px, transparent 5px) 0 0,
        radial-gradient(circle at 30px 10px, #333 4px, transparent 5px) 0 0;
    background-size: 40px 40px;
    /* Matches hole spacing */
    background-repeat: repeat-y;
    z-index: 2;
}

.notebook-page::after {
    content: '';
    position: absolute;
    top: 18px;
    /* Offset to align with holes */
    bottom: 10px;
    left: -20px;
    width: 30px;
    background: repeating-linear-gradient(15deg,
            transparent,
            transparent 33px,
            #888 33px,
            #ddd 36px,
            #fdfdfd 36px,
            #fdfdfd 40px);
    z-index: 1;
    filter: drop-shadow(2px 2px 1px rgba(0, 0, 0, 0.3));
}

/* ===== Scattered Elements (Polaroids) ===== */
.scattered-photos {
    position: absolute;
    top: -50px;
    left: -190px;
    width: 280px;
    /* Slightly wider container */
    height: 100%;
    pointer-events: none;
    z-index: 10;
    display: none;
    /* Hidden on mobile */
}

@media (min-width: 1200px) {
    .scattered-photos {
        display: block;
    }
}

.polaroid {
    background: white;
    padding: 10px 10px 30px 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    position: absolute;
    transition: transform 0.3s ease, box-shadow 0.3s ease, z-index 0s;
    width: 200px;
    /* Larger size */
    cursor: pointer;
    border: 1px solid #ddd;
}

.polaroid:hover {
    transform: rotate(0deg) scale(1.1) !important;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.3);
    z-index: 100;
}

.polaroid img {
    width: 100%;
    height: auto;
    display: block;
    border: 1px solid #eee;
}

.polaroid:nth-child(1) {
    top: 20px;
    left: -20px;
    transform: rotate(-8deg);
    z-index: 1;
}

.polaroid:nth-child(2) {
    top: 220px;
    left: 30px;
    transform: rotate(4deg);
    z-index: 2;
}

.polaroid:nth-child(3) {
    top: 320px;
    left: 10px;
    transform: rotate(15deg);
}

/* ===== Content Typography ===== */
h1,
h2,
h3 {
    color: #1a56db;
    /* Blue text */
    margin-bottom: 0.5rem;
    line-height: 1.4;
    background: var(--paper-white);
    /* Hide lines behind text title */
    display: inline-block;
    padding: 0 5px;
}

h1.main-title {
    font-size: 2.5rem;
    border-bottom: 3px solid #1a56db;
    margin-bottom: 2rem;
}

p,
li {
    font-size: 1.1rem;
    line-height: 2rem;
    /* Align with paper lines */
    margin-bottom: 0;
    font-weight: 600;
}

.highlight-box {
    background-color: rgba(255, 255, 255, 0.9);
    padding: 1rem;
    border: 2px dashed #1a56db;
    margin: 1rem 0;
    transform: rotate(-1deg);
}

/* ===== Header & Nav inside Notebook ===== */
.notebook-header {
    border-bottom: 2px solid #ccc;
    padding-bottom: 1rem;
    margin-bottom: 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo-area {
    width: 200px;
}

.logo-area svg {
    width: 100%;
    height: auto;
}

.info-header {
    font-size: 0.9rem;
    text-align: left;
    line-height: 1.5;
    /* Reset line height for header info */
}

/* ===== Navigation Tabs ===== */
.notebook-tabs {
    position: absolute;
    right: -40px;
    top: 100px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.tab {
    width: 60px;
    height: 120px;
    border-radius: 0 10px 10px 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
    cursor: pointer;
    box-shadow: 2px 2px 5px rgba(0, 0, 0, 0.2);
    writing-mode: vertical-rl;
    text-orientation: mixed;
    transform: translateX(0);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    font-size: 1.2rem;
    animation: tabPulse 3s ease-in-out infinite;
}

@keyframes tabPulse {

    0%,
    100% {
        box-shadow: 2px 2px 5px rgba(0, 0, 0, 0.2);
    }

    50% {
        box-shadow: 2px 2px 15px rgba(0, 0, 0, 0.4), 0 0 10px rgba(255, 255, 255, 0.3);
    }
}

.tab:hover {
    transform: translateX(10px);
    box-shadow: 4px 4px 10px rgba(0, 0, 0, 0.3);
}

.tab.ar {
    background-color: var(--accent-green);
}

.tab.en {
    background-color: var(--accent-orange);
}

/* ===== Section Styling ===== */
.content-section {
    margin-bottom: 2rem;
}

.bullet-list {
    list-style: disc;
    padding-right: 20px;
}

.bullet-list li::marker {
    color: #1a56db;
}

/* ===== Decorative Stationery (CSS Only) ===== */
.stationery-pen {
    position: absolute;
    bottom: 50px;
    left: -60px;
    width: 20px;
    height: 300px;
    background: linear-gradient(90deg, #333, #666, #111);
    border-radius: 10px;
    transform: rotate(25deg);
    box-shadow: 5px 10px 15px rgba(0, 0, 0, 0.4);
    z-index: 20;
}

.stationery-pen::before {
    content: '';
    /* Pen tip */
    position: absolute;
    top: -20px;
    left: 0;
    border-left: 10px solid transparent;
    border-right: 10px solid transparent;
    border-bottom: 20px solid #ccc;
}

/* Sticky Note */
.sticky-note {
    position: absolute;
    bottom: 200px;
    right: -200px;
    width: 200px;
    height: 200px;
    background-color: #ffeb3b;
    padding: 20px;
    box-shadow: 5px 5px 7px rgba(0, 0, 0, 0.1);
    transform: rotate(3deg);
    font-family: 'Comic Sans MS', 'Cairo', cursive;
    color: #333;
    z-index: 5;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    font-weight: bold;
    font-size: 1.2rem;
    line-height: 1.5;
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    animation: stickyBounce 2s ease-in-out infinite;
}

@keyframes stickyBounce {

    0%,
    100% {
        transform: rotate(3deg) translateY(0);
        box-shadow: 5px 5px 7px rgba(0, 0, 0, 0.1);
    }

    50% {
        transform: rotate(3deg) translateY(-10px);
        box-shadow: 5px 15px 15px rgba(0, 0, 0, 0.2);
    }
}

.sticky-note:hover {
    transform: rotate(0deg) scale(1.1);
    box-shadow: 8px 8px 15px rgba(0, 0, 0, 0.25);
    animation: none;
}

.sticky-note::after {
    content: '';
    position: absolute;
    bottom: 0px;
    right: 0px;
    border-width: 0 0 40px 40px;
    border-style: solid;
    border-color: transparent transparent rgba(0, 0, 0, 0.1) transparent;
}

/* ===== Brand Badges ===== */
.brands-showcase {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    justify-content: center;
    margin-top: 1.5rem;
}

.brand-badge {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 10px 25px;
    border-radius: 25px;
    font-weight: bold;
    font-size: 1rem;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    cursor: pointer;
    transition: all 0.3s ease;
    animation: badgePop 0.5s ease-out backwards;
}

.brand-badge:nth-child(1) {
    animation-delay: 0.1s;
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}

.brand-badge:nth-child(2) {
    animation-delay: 0.2s;
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
}

.brand-badge:nth-child(3) {
    animation-delay: 0.3s;
    background: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%);
}

.brand-badge:nth-child(4) {
    animation-delay: 0.4s;
    background: linear-gradient(135deg, #fa709a 0%, #fee140 100%);
}

.brand-badge:nth-child(5) {
    animation-delay: 0.5s;
    background: linear-gradient(135deg, #30cfd0 0%, #330867 100%);
}

.brand-badge:nth-child(6) {
    animation-delay: 0.6s;
    background: linear-gradient(135deg, #ff0844 0%, #ffb199 100%);
}

@keyframes badgePop {
    from {
        opacity: 0;
        transform: scale(0) rotate(180deg);
    }

    to {
        opacity: 1;
        transform: scale(1) rotate(0deg);
    }
}

.brand-badge:hover {
    transform: translateY(-5px) scale(1.1);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}

/* ===== Footer (Simple) ===== */
.footer-simple {
    margin-top: 3rem;
    border-top: 2px solid #ccc;
    padding-top: 1rem;
    text-align: center;
    font-size: 0.9rem;
    line-height: normal;
}

/* ===== Mobile Responsiveness ===== */
@media (max-width: 768px) {
    .notebook-page {
        margin-left: 0;
        padding: 2rem;
        background-size: 100% 1.5rem;
        /* Smaller lines */
    }

    .notebook-page::before,
    .notebook-page::after {
        display: none;
        /* Remove spiral on small screens */
    }

    .notebook-tabs {
        display: none;
    }

    p,
    li {
        font-size: 1rem;
        line-height: 1.5rem;
    }

    .sticky-note {
        position: relative;
        bottom: auto;
        right: auto;
        transform: none;
        margin: 20px auto;
        width: 100%;
    }
}