/* 
======================
ROLL WITH ADVANTAGE - TOOLS PAGE STYLES
======================
*/

/* 
======================
TOOLS HERO SECTION
======================
*/
.tools-hero {
    background-position: bottom center;
    height: 300px;
}

.tools-hero .hero-background {
    background: linear-gradient(rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.7)), url('../assets/images/tools/tools-bg.jpg');
    background-size: cover;
    background-position: center;
}

.tools-hero .magical-overlay {
    background: 
        radial-gradient(circle at 30% 70%, rgba(11, 42, 169, 0.4) 0%, transparent 50%),
        radial-gradient(circle at 70% 30%, rgba(127, 14, 189, 0.4) 0%, transparent 50%),
        radial-gradient(circle at 50% 50%, rgba(11, 42, 169, 0.3) 0%, transparent 70%);
}

/* 
======================
ENHANCED TOOL CARDS
======================
*/
.tool-card-lg {
    background-color: white;
    border-radius: var(--border-radius);
    margin-bottom: var(--spacing-md);
    box-shadow: var(--shadow-md);
    position: relative;
    overflow: hidden;
    border: 2px solid rgba(11, 42, 169, 0.1);
    z-index: 1;
    
    /* 3D tilt properties */
    transform-style: preserve-3d;
    transform: perspective(1000px) rotateX(0) rotateY(0) rotateZ(0);
    transition: transform 0.4s ease, box-shadow 0.4s ease, border-color 0.4s ease;
}

.tool-card-lg::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, 
        rgba(11, 42, 169, 0.05), 
        rgba(127, 14, 189, 0.05), 
        rgba(195, 10, 61, 0.05));
    z-index: -1;
    opacity: 0;
    transition: opacity 0.5s ease;
}

.tool-card-lg:hover {
    box-shadow: 
        0 15px 30px rgba(11, 42, 169, 0.2),
        0 0 20px rgba(127, 14, 189, 0.2);
    border-color: var(--primary-blue-light);
}

.tool-card-lg:hover::before {
    opacity: 1;
}

.tool-header {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    padding: 20px;
    border-bottom: 2px solid rgba(11, 42, 169, 0.1);
}

.tool-icon {
    width: 60px;
    height: 60px;
    color: var(--primary-blue);
    font-size: 2rem;
    margin: 0px !important;
    transition: all 0.5s ease;
    position: relative;
}

.tool-icon::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at center, rgba(11, 42, 169, 0.2) 0%, transparent 70%);
    border-radius: 50%;
    transform: scale(0);
    transition: transform 0.5s ease;
}

.tool-card-lg:hover .tool-icon {
    color: var(--primary-blue-dark);
    transform: scale(1.1) rotate(10deg);
}

.tool-card-lg:hover .tool-icon::after {
    transform: scale(1.5);
    animation: pulse 2s infinite;
}

.tool-header h3 {
    font-size: 1.8rem;
    margin: 0;
    color: var(--primary-blue);
    transition: color 0.3s ease;
}

.tool-card-lg:hover .tool-header h3 {
    color: var(--primary-blue-dark);
}

.tool-preview-lg {
    position: relative;
    width: 100%;
    height: 250px;
    overflow: hidden;
}

.tool-screenshot {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.tool-card-lg:hover .tool-screenshot {
    transform: scale(1.05);
}

.preview-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, 
        rgba(11, 42, 169, 0.7) 0%, 
        rgba(127, 14, 189, 0.5) 100%);
    opacity: 0;
    transition: opacity 0.5s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.tool-card-lg:hover .preview-overlay {
    opacity: 1;
}

.tool-content {
    padding: 20px;
}

.tool-content p {
    font-size: 1.1rem;
    line-height: 1.6;
    margin-bottom: 15px;
}

.tool-content h4 {
    color: var(--primary-blue);
    margin: 20px 0 10px;
    position: relative;
    display: inline-block;
}

.tool-content h4::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 50px;
    height: 2px;
    background: var(--gradient-blue);
    transition: width 0.5s ease;
}

.tool-card-lg:hover .tool-content h4::after {
    width: 100%;
}

.tool-features {
    list-style: none;
    padding: 0;
    margin: 0 0 25px;
}

.tool-features li {
    margin-bottom: 10px;
    display: flex;
    align-items: center;
}

.tool-features li i {
    color: var(--primary-blue);
    margin-right: 10px;
    font-size: 0.9rem;
}

.tool-card-lg .btn {
    margin-top: 10px;
}

/* 
======================
MINI DICE SET
======================
*/
.mini-dice-set {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 15px;
    max-width: 300px;
}

.mini-die {
    width: 50px;
    height: 50px;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    animation: floatDie 3s ease-in-out infinite;
    filter: drop-shadow(0 0 10px rgba(255, 255, 255, 0.5));
}

.mini-die.d4 {
    background-image: url("../assets/images/dice/d4.svg");
    animation-delay: 0s;
}

.mini-die.d6 {
    background-image: url("../assets/images/dice/d6.svg");
    animation-delay: 0.5s;
}

.mini-die.d8 {
    background-image: url("../assets/images/dice/d8.svg");
    animation-delay: 1s;
}

.mini-die.d10 {
    background-image: url("../assets/images/dice/d10.svg");
    animation-delay: 1.5s;
}

.mini-die.d12 {
    background-image: url("../assets/images/dice/d12.svg");
    animation-delay: 2s;
}

.mini-die.d20 {
    background-image: url("../assets/images/dice/d20.svg");
    animation-delay: 2.5s;
}

@keyframes floatDie {
    0%, 100% {
        transform: translateY(0) rotate(0deg);
    }
    50% {
        transform: translateY(-10px) rotate(180deg);
    }
}

/* 
======================
CHARACTER SILHOUETTES
======================
*/
.character-preview {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    height: 100%;
    position: relative;
}

.character-silhouette {
    width: 70px;
    height: 70px;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    position: absolute;
    filter: drop-shadow(0 0 10px rgba(255, 255, 255, 0.5));
}

.character-silhouette.crown {
    top: 20%;
    left: 30%;
    background-image: url("../assets/images/icons/crown.svg");
    animation: float 4s ease-in-out infinite;
}

.character-silhouette.sword {
    top: 60%;
    left: 20%;
    background-image: url("../assets/images/icons/sword.svg");
    animation: float 5s ease-in-out infinite;
    animation-delay: 0.5s;
}

.character-silhouette.scroll {
    top: 30%;
    right: 25%;
    background-image: url("../assets/images/icons/scroll.svg");
    animation: float 4.5s ease-in-out infinite;
    animation-delay: 1s;
}

.character-silhouette.shield {
    top: 50%;
    right: 20%;
    background-image: url("../assets/images/icons/shield.svg");
    animation: float 5.5s ease-in-out infinite;
    animation-delay: 1.5s;
}

.character-silhouette.wand {
    bottom: 30%;
    left: 50%;
    background-image: url("../assets/images/icons/wand.svg");
    animation: float 6s ease-in-out infinite;
    animation-delay: 2s;
}

@keyframes float {
    0%, 100% {
        transform: translateY(0) rotate(0deg);
    }
    50% {
        transform: translateY(-15px) rotate(5deg);
    }
}

/* 
======================
HOUSE CRESTS
======================
*/
.house-crests {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
    width: 100%;
    height: 100%;
}

.house-crest {
    width: 80px;
    height: 80px;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    transition: transform 0.5s ease;
    filter: drop-shadow(0 0 10px rgba(255, 255, 255, 0.5));
}

.house-crest.raven {
    background-image: url("../assets/images/crests/raven.svg");
    animation: pulseCrest 3s ease-in-out infinite;
}

.house-crest.lion {
    background-image: url("../assets/images/crests/lion.svg");
    animation: pulseCrest 3s ease-in-out infinite;
    animation-delay: 0.6s;
}

.house-crest.eagle {
    background-image: url("../assets/images/crests/eagle.svg");
    animation: pulseCrest 3s ease-in-out infinite;
    animation-delay: 1.2s;
}

.house-crest.stag {
    background-image: url("../assets/images/crests/stag.svg");
    animation: pulseCrest 3s ease-in-out infinite;
    animation-delay: 1.8s;
}

.house-crest.fox {
    background-image: url("../assets/images/crests/fox.svg");
    animation: pulseCrest 3s ease-in-out infinite;
    animation-delay: 2.4s;
}

@keyframes pulseCrest {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.2);
    }
}

/* 
======================
MAP MARKERS
======================
*/
.map-markers {
    position: relative;
    width: 100%;
    height: 100%;
}

.map-marker {
    position: absolute;
    width: 40px;
    height: 40px;
    background-image: url("../assets/images/icons/map-marker.svg");
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    filter: drop-shadow(0 0 10px rgba(255, 255, 255, 0.5));
}

.map-markers .map-marker:nth-child(1) {
    top: 30%;
    left: 25%;
    animation: bounce 2s infinite;
}

.map-markers .map-marker:nth-child(2) {
    top: 50%;
    left: 60%;
    animation: bounce 2s infinite;
    animation-delay: 0.5s;
}

.map-markers .map-marker:nth-child(3) {
    top: 65%;
    left: 40%;
    animation: bounce 2s infinite;
    animation-delay: 1s;
}

.map-pulse {
    position: absolute;
    top: 40%;
    left: 45%;
    width: 50px;
    height: 50px;
    background-color: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    animation: pulse 2s infinite;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-10px);
    }
    60% {
        transform: translateY(-5px);
    }
}

/* 
======================
TOOLS IN ACTION SECTION
======================
*/
.tools-action-bg {
    background-image: url("../assets/images/patterns/graph-paper.svg");
    opacity: 0.05;
}

.action-examples {
    display: flex;
    flex-direction: column;
    gap: 50px;
    padding: 20px 0;
}

.action-example {
    display: flex;
    align-items: center;
    gap: 40px;
}

.action-example:nth-child(even) {
    flex-direction: row-reverse;
}

.action-image {
    flex: 1;
    position: relative;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    transition: transform 0.5s ease;
}

.action-image img {
    width: 100%;
    display: block;
    transition: transform 0.5s ease;
}

.action-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, 
        rgba(11, 42, 169, 0.6) 0%, 
        rgba(127, 14, 189, 0.4) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.5s ease;
}

.action-overlay i {
    font-size: 3rem;
    color: white;
    transform: scale(0.5);
    transition: transform 0.5s ease;
}

.action-example:hover .action-image {
    transform: scale(1.02);
}

.action-example:hover .action-image img {
    transform: scale(1.1);
}

.action-example:hover .action-overlay {
    opacity: 1;
}

.action-example:hover .action-overlay i {
    transform: scale(1);
}

.action-content {
    flex: 1;
}

.action-content h3 {
    color: var(--primary-purple);
    margin-bottom: 15px;
    font-size: 1.5rem;
}

.action-content p {
    margin-bottom: 20px;
}

.btn-small {
    display: inline-block;
    padding: 8px 16px;
    border-radius: var(--border-radius);
    background: var(--gradient-purple);
    color: white;
    font-family: var(--font-headers);
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-sm);
}

.btn-small:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
    color: white;
}

/* 
======================
GET STARTED SECTION
======================
*/
.get-started-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
    margin-top: 40px;
}

.get-started-card {
    background-color: white;
    border-radius: var(--border-radius);
    padding: 30px 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    box-shadow: var(--shadow-md);
    transition: all 0.5s ease;
    position: relative;
    overflow: hidden;
    border: 2px solid transparent;
    height: 200px;
}

.get-started-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 5px;
    background: var(--gradient-rainbow);
    transform: scaleX(0);
    transition: transform 0.5s ease;
}

.get-started-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-blue-light);
}

.get-started-card:hover::before {
    transform: scaleX(1);
}

.gs-icon {
    font-size: 3rem;
    color: var(--primary-blue);
    margin-bottom: 15px;
    transition: all 0.5s ease;
}

.get-started-card:hover .gs-icon {
    transform: scale(1.2) rotate(10deg);
    color: var(--primary-purple);
}

.get-started-card h3 {
    color: var(--text-dark);
    margin-bottom: 20px;
    transition: color 0.3s ease;
}

.get-started-card:hover h3 {
    color: var(--primary-blue);
}

.gs-arrow {
    position: absolute;
    bottom: 15px;
    right: 15px;
    width: 30px;
    height: 30px;
    background-color: var(--primary-blue-light);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    transform: scale(0);
    transition: all 0.5s ease;
}

.get-started-card:hover .gs-arrow {
    transform: scale(1);
}

/* 
======================
RESPONSIVE ADJUSTMENTS
======================
*/
@media (max-width: 992px) {
    .action-example, 
    .action-example:nth-child(even) {
        flex-direction: column;
        text-align: center;
    }
    
    .action-image,
    .action-content {
        width: 100%;
    }
    
    .tools-grid.enhanced {
        grid-template-columns: 2fr;
    }
}

@media (max-width: 768px) {
    .get-started-grid {
        grid-template-columns: 1fr;
    }
    
    .tool-header {
        flex-direction: column;
        text-align: center;
    }
    
    .tool-icon {
        margin-right: 0;
        margin-bottom: 15px;
    }
}

/* Add these SVG placeholder values until the actual assets are created */
@media (max-width: 480px) {
    .mini-die {
        width: 40px;
        height: 40px;
    }
    
    .house-crest {
        width: 60px;
        height: 60px;
    }
}

/* Placeholder SVG URL definitions until actual assets are created */
[class*='-silhouette'],
[class*='house-crest'],
.map-marker {
    /* Define fallback background color if SVG fails to load */
    background-color: rgba(255, 255, 255, 0.2);
}